<template>
  <div class="ele-body">
    <el-card shadow="never">
      <div class="zfb-purple"
           v-loading="loadingResubmit"
           element-loading-text="加载中..."
           v-if="incomingStatus == '00' || incomingStatus == '10'"
           :style="loadingResubmit ? { height: windowHeight + 'px' } : ''">
        <div class="fromSubmitOne">
          <h6 class="hLabel">选择进件类型</h6>
          <div :class="[
              IncomingOrNot == 1
                ? 'incomingTypeSwitch'
                : 'active-incomingTypeSwitch'
            ]">
            <!-- 微信 -->
            <div :class="[
                selectIncomingTypeStatus == 1
                  ? 'active-wxIncoming'
                  : 'wxIncoming'
              ]"
                 @click="incomingType(1)">
              <div class="wxHLabel"></div>

              <div class="wxText">
                <div :class="[
                    selectIncomingTypeStatus == 1
                      ? 'activr-wxTextFontSize'
                      : 'wxTextFontSize'
                  ]">微信进件</div>
              </div>
            </div>
            <!-- 支付宝 -->
            <div :class="[
                selectIncomingTypeStatus == 2
                  ? 'active-allIncoming'
                  : 'zfbIncoming'
              ]"
                 @click="incomingType(2)">
              <div class="zfbHLabel"></div>

              <div class="zfbText">
                <div :class="[
                    selectIncomingTypeStatus == 2
                      ? 'activr-zfbTextFontSize'
                      : 'zfbTextFontSize'
                  ]">支付宝进件</div>
                <!-- <div>{{ IncomingOrNot == 3 ? '已经进件' : '未进件' }}</div> -->
              </div>
            </div>
            <!-- 全部 -->
            <div :class="[
                selectIncomingTypeStatus == 3
                  ? 'active-allIncoming'
                  : 'allIncoming'
              ]"
                 @click="incomingType(3)">
              <div class="zfbHLabel"></div>

              <div class="zfbText">
                <div :class="[
                    selectIncomingTypeStatus == 3
                      ? 'activr-zfbTextFontSize'
                      : 'zfbTextFontSize'
                  ]">全部</div>
                <!-- <div>{{ IncomingOrNot == 3 ? '已经进件' : '未进件' }}</div> -->
              </div>
            </div>
          </div>

          <div>
            <el-form :label-position="labelPosition"
                     label-width="100px"
                     :rules="rules"
                     ref="wxSumbitForm"
                     :model="wxSumbitForm"
                     class="ruleForm">
              <h6 class="hLabel">商户信息</h6>
              <el-form-item label="商户经营类型"
                            label-width="150px"
                            prop="merMode">
                <!-- <div class="subjectTypeSwitch">

                  <div :class="[
                      wxSumbitForm.subjectType == 'SUBJECT_TYPE_INDIVIDUAL'
                        ? 'individuality'
                        : 'active-individuality'
                    ]"
                       @click="switchType('SUBJECT_TYPE_INDIVIDUAL')">个体工商户</div>

                  <div :class="[
                      wxSumbitForm.subjectType == 'SUBJECT_TYPE_ENTERPRISE'
                        ? 'active-enterprise'
                        : 'enterprise'
                    ]"
                       @click="switchType('SUBJECT_TYPE_ENTERPRISE')">企业</div>
                </div> -->
                <el-radio-group v-model="wxSumbitForm.merMode"
                                @change="merModeFn">
                  <el-radio label="0">企业</el-radio>
                  <el-radio label="1">个体户</el-radio>
                  <el-radio label="2">小微</el-radio>
                </el-radio-group>
              </el-form-item>

              <el-form-item label="注册名称"
                            label-width="150px"
                            prop="merName">
                <el-input v-model="wxSumbitForm.merName"
                          placeholder="请选择注册名称"></el-input>
              </el-form-item>

              <el-form-item label="商户类型"
                            label-width="150px"
                            prop="merType">
                <el-select v-model="wxSumbitForm.merType"
                           placeholder="请输入商户类型(MCC)"
                           @change="
                    (event) => verifyChangesFn(event, 'qualificationType')
                  ">
                  <el-option v-for="item in mccOptions"
                             :key="item.value"
                             :label="item.label"
                             :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="经营名称"
                            label-width="150px"
                            prop="businName">
                <el-input v-model="wxSumbitForm.businName"
                          placeholder="请选择经营名称"></el-input>
              </el-form-item>
              <el-form-item label="行业大类"
                            label-width="150px"
                            prop="standardFlag">
                <!-- <el-input v-model="wxSumbitForm.licenseNumber"
                          placeholder="请填写营业执照编号"></el-input> -->
                <el-radio-group v-model="wxSumbitForm.standardFlag">
                  <el-radio label="0">标准</el-radio>
                  <el-radio label="1">优惠</el-radio>
                  <el-radio label="2">减免</el-radio>
                </el-radio-group>
              </el-form-item>
              <!-- <el-form-item label="商户区域"
                            label-width="150px"
                            prop="merArea">
                <regions-select v-model="wxSumbitForm.merArea"
                                placeholder="请选择商户区域"
                                @input="regionsInput" />
              </el-form-item> -->

              <el-form-item label="注册地址"
                            label-width="150px"
                            prop="merAddr">
                <el-input placeholder="请输入注册地址"
                          v-model="wxSumbitForm.merAddr"></el-input>
              </el-form-item>
              <div class="flex-start">
                <el-form-item prop="businBegtime"
                              label-width="150px"
                              label="营业开始时间">
                  <el-time-picker v-model="wxSumbitForm.businBegtime"
                                  value-format="HHMM"
                                  format="HH:MM"
                                  @change="begtimeArrFn"
                                  placeholder="营业开始时间">
                  </el-time-picker>
                  <!-- <el-date-picker v-model="wxSumbitForm.businBegtime"
                                  type="datetime"
                                  value-format="HHMM"
                                  placeholder="营业开始时间"
                                  @change="begtimeArrFn">
                  </el-date-picker> -->
                </el-form-item>

                <el-form-item label-width="150px"
                              prop="businEndtime"
                              label="营业结束时间">
                  <el-time-picker v-model="wxSumbitForm.businEndtime"
                                  value-format="HHMM"
                                  format="HH:MM"
                                  @change="businEndtimeArrFn"
                                  placeholder="营业结束时间">
                  </el-time-picker>
                  <!-- <el-date-picker v-model="wxSumbitForm.businEndtime"
                                  type="datetime"
                                  value-format="HHMM"
                                  placeholder="营业执照结束时间"
                                  @change=" businEndtimeArrFn"> -->
                  <!-- </el-date-picker> -->
                </el-form-item>
              </div>

              <el-form-item label="公司规模"
                            label-width="150px"
                            prop="employeeNum">
                <el-radio-group v-model="wxSumbitForm.employeeNum">
                  <el-radio label="1">0-50人</el-radio>
                  <el-radio label="2">50-100人</el-radio>
                  <el-radio label="3">100上</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="经营形态"
                            label-width="150px"
                            prop="businForm">
                <el-radio-group v-model="wxSumbitForm.businForm">
                  <el-radio label="01">连锁店</el-radio>
                  <el-radio label="02">普通店</el-radio>
                </el-radio-group>
              </el-form-item>

              <!-- 经营信息 -->
              <div>
                <h6 class="hLabel">附加信息</h6>
                <el-form-item label="法定代表姓名"
                              label-width="150px"
                              prop="merLegal">
                  <el-input placeholder="请输入法定代表人姓名"
                            v-model="wxSumbitForm.merLegal"></el-input>
                </el-form-item>
                <el-form-item label="证件类型"
                              label-width="150px"
                              prop="legalType">
                  <el-select v-model="wxSumbitForm.legalType"
                             placeholder="请选择证件类型"
                             @change="
                      (event) => verifyChangesFn(event, 'qualificationType')
                    ">
                    <el-option v-for="item in legalTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <div class="flex-start">
                  <el-form-item label="法人身份证人像面"
                                label-width="150px"
                                prop="frontCorporateIDCard"
                                class="positiveIDcards">
                    <el-upload action="#"
                               ref="pictureFrontCorporateIDCard"
                               :limit="1"
                               :before-upload="beforeAvatarUpload"
                               :on-exceed="exceedFn"
                               :file-list="frsfzRxList"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(
                            file,
                            fileList,
                            'frontCorporateIDCard',
                            '01'
                          )
                      "
                               list-type="picture-card"
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'frontCorporateIDCard')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="法人身份证国徽面"
                                label-width="150px"
                                prop="certImageBack">
                    <el-upload action="#"
                               :limit="1"
                               list-type="picture-card"
                               :file-list="frsfzGhList"
                               :on-exceed="exceedFn"
                               ref="pictureUploadCertImageBack"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(
                            file,
                            fileList,
                            'certImageBack',
                            '02'
                          )
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'certImageBack')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>
                </div>
                <el-form-item label="法人证件号码"
                              label-width="150px"
                              prop="legalCode">
                  <el-input placeholder="请输入法人证件号码"
                            v-model="wxSumbitForm.legalCode"></el-input>
                </el-form-item>
                <el-form-item label="证件有效期"
                              label-width="150px"
                              prop="legalValidity">
                  <el-date-picker v-model="wxSumbitForm.legalValidity"
                                  type="daterange"
                                  unlink-panels
                                  @change="legalValidityFn"
                                  range-separator="至"
                                  start-placeholder="开始日期"
                                  end-placeholder="结束日期"
                                  format="yyyy.MM.dd"
                                  value-format="yyyy.MM.dd"
                                  class="ele-fluid" />
                </el-form-item>
                <el-form-item label="手机号"
                              label-width="150px"
                              prop="legalPhone">
                  <el-input placeholder="请输入手机号"
                            v-model="wxSumbitForm.legalPhone"></el-input>
                </el-form-item>
                <el-form-item label="商户人姓名"
                              label-width="150px"
                              prop="linkMan">
                  <el-input placeholder="请输入商户人姓名"
                            v-model="wxSumbitForm.linkMan"></el-input>
                </el-form-item>
                <el-form-item label="商户联系人证件类型"
                              label-width="150px"
                              prop="linkmanType">
                  <el-select v-model="wxSumbitForm.linkmanType"
                             placeholder="请输入商户联系人证件类型"
                             @change="verifyChangesFn">
                    <el-option v-for="item in linkmanTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="商户人证件号码"
                              label-width="150px"
                              prop="linkmanCode">
                  <el-input placeholder="请输入商户证件类型"
                            v-model="wxSumbitForm.linkmanCode"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="商户人证件有效期"
                              label-width="150px"
                              prop="linkmanValidity">
                  <el-date-picker v-model="wxSumbitForm.linkmanValidity"
                                  type="daterange"
                                  unlink-panels
                                  @change="linkmanValidityFn"
                                  range-separator="至"
                                  start-placeholder="开始日期"
                                  end-placeholder="结束日期"
                                  format="yyyy.MM.dd"
                                  value-format="yyyy.MM.dd"
                                  class="ele-fluid" />
                </el-form-item>
                <el-form-item label="商户人联系人手机号"
                              label-width="150px"
                              prop="linkmanPhone">
                  <el-input placeholder="请输入商户人联系人手机号"
                            v-model="wxSumbitForm.linkmanPhone"></el-input>
                </el-form-item>
              </div>

              <div class="fromSubmitTwo">
                <h6 class="hLabel">营业执照信息</h6>
                <el-form-item label="营业执照图片"
                              v-if="merModeSelect !== 3"
                              label-width="150px"
                              prop="businessLicense">
                  <el-upload action="#"
                             ref="pictureUploadBusinessLicense"
                             list-type="picture-card"
                             :limit="5"
                             :before-upload="beforeAvatarUpload"
                             :file-list="yyzzList"
                             :on-exceed="exceedFn"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(
                          file,
                          fileList,
                          'businessLicense',
                          '05'
                        )
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <!-- 图片的预览 -->
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <!-- 图片的下载 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>
                        <!-- 图片的移除 -->
                        <span v-if="!disabled"
                              class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'businessLicense')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>

                <el-form-item label="门头照片"
                              label-width="150px"
                              prop="certImage"
                              class="positiveIDcards">
                  <!-- <el-upload class="upload-demo"
                               action="https://mtest.eycard.cn:4443/AG_MerchantManagementSystem_Core/agent/api/imgUpl"
                               :on-preview="handlePreview"
                               :on-remove="handleRemove"
                               :before-remove="beforeRemove"
                               multiple
                               :limit="3"
                               :on-exceed="handleExceed"
                               :file-list="fileList">
                      <el-button size="small"
                                 type="primary">点击上传</el-button>
                      <div slot="tip"
                           class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                    </el-upload> -->

                  <el-upload action="#"
                             ref="pictureUploadDoorPhoto"
                             :limit="5"
                             :before-upload="beforeAvatarUpload"
                             :on-exceed="exceedFn"
                             :file-list="yyzzList"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'doorPhoto', '08')
                    "
                             list-type="picture-card"
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'doorPhoto')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>

                <el-form-item label="门牌号"
                              v-if="merModeSelect == 1"
                              label-width="150px"
                              prop="houseNumber">
                  <el-upload action="#"
                             list-type="picture-card"
                             :limit="5"
                             :show-file-list="false"
                             :before-upload="beforeAvatarUpload"
                             :file-list="mphList"
                             :on-exceed="exceedFn"
                             ref="pictureUploadHouseNumber"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'houseNumber', '09')
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'houseNumber')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>

                <el-form-item label="收银台"
                              label-width="150px"
                              prop="cashier"
                              class="positiveIDcards">
                  <el-upload action="#"
                             ref="pictureUploadCashier"
                             :limit="5"
                             :file-list="sytList"
                             :before-upload="beforeAvatarUpload"
                             :on-exceed="exceedFn"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(file, fileList, 'cashier', '06')
                    "
                             list-type="picture-card"
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'cashier')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>

                <el-form-item label="内部环境照片"
                              label-width="150px"
                              prop="internalEnvironment">
                  <el-upload action="#"
                             list-type="picture-card"
                             :limit="5"
                             :file-list="nbhjzList"
                             :before-upload="beforeAvatarUpload"
                             :on-exceed="exceedFn"
                             ref="pictureInternalEnvironment"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(
                          file,
                          fileList,
                          'internalEnvironment',
                          '07'
                        )
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'internalEnvironment')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>

                <el-form-item label="营业执照类型"
                              label-width="150px"
                              prop="licenseType">
                  <el-select v-model="wxSumbitForm.licenseType"
                             placeholder="请选择营业执照类型"
                             @change="verifyChangesFn">
                    <el-option v-for="item in licenseTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="营业执照证件有效期"
                              label-width="150px"
                              prop="licValidity">
                  <el-date-picker v-model="wxSumbitForm.licValidity"
                                  type="daterange"
                                  unlink-panels
                                  @change="licValidityFn"
                                  range-separator="至"
                                  start-placeholder="开始日期"
                                  end-placeholder="结束日期"
                                  format="yyyy.MM.dd"
                                  value-format="yyyy.MM.dd"
                                  class="ele-fluid" />
                </el-form-item>
                <el-form-item label="统一社会信用码"
                              label-width="150px"
                              prop="merLic">
                  <el-input placeholder="请输入工商注册号/统一社会信用码"
                            v-model="wxSumbitForm.merLic"></el-input>
                </el-form-item>
                <el-form-item label="主营业务"
                              label-width="150px"
                              prop="businScope">
                  <el-input placeholder="请输入主要经营业务"
                            v-model="wxSumbitForm.businScope"></el-input>
                </el-form-item>
                <el-form-item label="注册资本"
                              label-width="150px"
                              prop="capital">
                  <el-input placeholder="请输入注册资本"
                            v-model="wxSumbitForm.capital"></el-input>
                </el-form-item>
                <el-form-item label="注册地址"
                              label-width="150px"
                              prop="licAddr">
                  <el-input placeholder="请输入注册地址"
                            v-model="wxSumbitForm.licAddr"></el-input>
                </el-form-item>

                <el-form-item label="实际控制人姓名"
                              label-width="150px"
                              prop="controlerName">
                  <el-input placeholder="请输入实际控制人姓名"
                            v-model="wxSumbitForm.controlerName"></el-input>
                </el-form-item>
                <el-form-item label="实际控制人证件号码"
                              label-width="150px"
                              prop="controlerLegalCode">
                  <el-input placeholder="请输入实际控制人证件号码"
                            v-model="wxSumbitForm.controlerLegalCode"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="实际控制人证件种类"
                              label-width="150px"
                              prop="controlerLegalType">
                  <el-select v-model="wxSumbitForm.controlerLegalType"
                             placeholder="请输入实际控制人证件种类"
                             @change="controlerLegalTypeFn">
                    <el-option v-for="item in controlerLegalTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="控制人证件有效期"
                              label-width="150px"
                              prop="controlerLegalValidity">
                  <el-date-picker v-model="wxSumbitForm.controlerLegalValidity"
                                  type="daterange"
                                  unlink-panels
                                  @change="controlerLegalValidityFn"
                                  range-separator="至"
                                  start-placeholder="开始日期"
                                  end-placeholder="结束日期"
                                  format="yyyy.MM.dd"
                                  value-format="yyyy.MM.dd"
                                  class="ele-fluid" />
                </el-form-item>
              </div>
              <!-- 经营信息 -->

              <!-- 结算到银行卡 -->
              <div>
                <h6 class="hLabel">结算到银行卡</h6>
                <el-form-item label="账户类型"
                              label-width="150px"
                              prop="accType">
                  <el-radio-group @change="accTypeFn"
                                  v-model="wxSumbitForm.accType">
                    <el-radio label="00">个人(对私)</el-radio>
                    <el-radio label="10">对公账户</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="开户行名称"
                              label-width="150px"
                              prop="bankName">
                  <el-select v-model="wxSumbitForm.bankName"
                             placeholder="请输入开户行名称"
                             @change="accountBankFn">
                    <el-option v-for="item in accountBankOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="开户行行号"
                              label-width="150px"
                              prop="bankCode">
                  <el-input placeholder="请输入开户行行号"
                            v-model="wxSumbitForm.bankCode"></el-input>
                </el-form-item>
                <el-form-item label="开户行账号"
                              label-width="150px"
                              prop="account">
                  <el-input placeholder="请输入开户行账号"
                            v-model="wxSumbitForm.account"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="账户名称"
                              label-width="150px"
                              prop="accName">
                  <el-input placeholder="请输入账户名称"
                            v-model="wxSumbitForm.accName"></el-input>
                </el-form-item>

                <el-form-item label="证件类型"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="legalType">
                  <el-select v-model="wxSumbitForm.legalType"
                             placeholder="请选择证件类型"
                             @change="
                      (event) => verifyChangesFn(event, 'qualificationType')
                    ">
                    <el-option v-for="item in legalTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="证件号"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="legalCode">
                  <el-input placeholder="请输入证件号"
                            v-model="wxSumbitForm.legalCode"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="对私手机号"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="accPhone">
                  <el-input placeholder="请输入对私手机号"
                            v-model="wxSumbitForm.accPhone"></el-input>
                </el-form-item>
              </div>
              <div class="drawer__footer">
                <!-- <a @click="downCom">
                  下载执照

                </a> -->
                <el-button type="primary"
                           v-if="incomingStatus == '00'"
                           :loading="loading"
                           @click="submitFn('wxSumbitForm', '00')">提交</el-button>
                <el-button type="primary"
                           v-if="incomingStatus == '10'"
                           :loading="loading"
                           @click="submitFn('wxSumbitForm', '10')">补件</el-button>
              </div>
            </el-form>
          </div>
        </div>
      </div>

      <el-drawer :visible.sync="drawer"
                 size="50%"
                 :before-close="handleClose"
                 ref="drawer"
                 :with-header="false">
        <incomingDetails v-if="incomingStatus == '0'"
                         :detailsList="supplementInfo"></incomingDetails>
      </el-drawer>
      <!-- 商家进件  9-待处理；3-待审核；0-审核通过；X-审核失败；1-审核驳回；5-待签约-->
      <!-- 当审核通过以后根据状态的变更 显示对应的表单 -->
      <div class="zfb-purple"
           v-if="
          successfulStatus == '1' ||
          successfulStatus == '2' ||
          successfulStatus == '3'
        "
           :style="loadingResubmit ? { height: windowHeight + 'px' } : ''">
        <div class="fromSubmitOne">
          <div>
            <el-form :label-position="labelPosition"
                     label-width="100px"
                     :rules="rules"
                     ref="wxSumbitForm"
                     :model="wxSumbitForm"
                     class="ruleForm">
              <div v-if="successfulStatus == '1'">
                <h6 class="hLabel">选择进件类型</h6>
                <div :class="[
              IncomingOrNot == 1
                ? 'incomingTypeSwitch'
                : 'active-incomingTypeSwitch'
            ]">
                  <!-- 微信 -->
                  <div :class="[
                selectIncomingTypeStatus == 1
                  ? 'active-wxIncoming'
                  : 'wxIncoming'
              ]"
                       @click="incomingType(1)">
                    <div class="wxHLabel"></div>

                    <div class="wxText">
                      <div :class="[
                    selectIncomingTypeStatus == 1
                      ? 'activr-wxTextFontSize'
                      : 'wxTextFontSize'
                  ]">微信进件</div>
                    </div>
                  </div>
                  <!-- 支付宝 -->
                  <div :class="[
                selectIncomingTypeStatus == 2
                  ? 'active-allIncoming'
                  : 'zfbIncoming'
              ]"
                       @click="incomingType(2)">
                    <div class="zfbHLabel"></div>

                    <div class="zfbText">
                      <div :class="[
                    selectIncomingTypeStatus == 2
                      ? 'activr-zfbTextFontSize'
                      : 'zfbTextFontSize'
                  ]">支付宝进件</div>
                      <!-- <div>{{ IncomingOrNot == 3 ? '已经进件' : '未进件' }}</div> -->
                    </div>
                  </div>
                  <!-- 全部 -->
                  <div :class="[
                selectIncomingTypeStatus == 3
                  ? 'active-allIncoming'
                  : 'allIncoming'
              ]"
                       @click="incomingType(3)">
                    <div class="zfbHLabel"></div>

                    <div class="zfbText">
                      <div :class="[
                    selectIncomingTypeStatus == 3
                      ? 'activr-zfbTextFontSize'
                      : 'zfbTextFontSize'
                  ]">全部</div>
                      <!-- <div>{{ IncomingOrNot == 3 ? '已经进件' : '未进件' }}</div> -->
                    </div>
                  </div>
                </div>
              </div>
              <div v-if="successfulStatus == '2'">
                <h6 class="hLabel">商户信息</h6>
                <el-form-item label="商户经营类型"
                              label-width="150px"
                              prop="merMode">
                  <el-radio-group v-model="wxSumbitForm.merMode"
                                  @change="merModeFn">
                    <el-radio label="0">企业</el-radio>
                    <el-radio label="1">个体户</el-radio>
                    <el-radio label="2">小微</el-radio>
                  </el-radio-group>
                </el-form-item>

                <el-form-item label="注册名称"
                              label-width="150px"
                              prop="merName">
                  <el-input v-model="wxSumbitForm.merName"
                            placeholder="请选择注册名称"></el-input>
                </el-form-item>

                <el-form-item label="商户类型"
                              label-width="150px"
                              prop="merType">
                  <el-select v-model="wxSumbitForm.merType"
                             placeholder="请输入商户类型(MCC)"
                             @change="
                      (event) => verifyChangesFn(event, 'qualificationType')
                    ">
                    <el-option v-for="item in mccOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="经营名称"
                              label-width="150px"
                              prop="businName">
                  <el-input v-model="wxSumbitForm.businName"
                            placeholder="请选择经营名称"></el-input>
                </el-form-item>
                <el-form-item label="行业大类"
                              label-width="150px"
                              prop="standardFlag">
                  <!-- <el-input v-model="wxSumbitForm.licenseNumber"
                          placeholder="请填写营业执照编号"></el-input> -->
                  <el-radio-group v-model="wxSumbitForm.standardFlag">
                    <el-radio label="0">标准</el-radio>
                    <el-radio label="1">优惠</el-radio>
                    <el-radio label="2">减免</el-radio>
                  </el-radio-group>
                </el-form-item>
                <!-- <el-form-item label="商户区域"
                            label-width="150px"
                            prop="merArea">
                <regions-select v-model="wxSumbitForm.merArea"
                                placeholder="请选择商户区域"
                                @input="regionsInput" />
              </el-form-item> -->

                <el-form-item label="注册地址"
                              label-width="150px"
                              prop="merAddr">
                  <el-input placeholder="请输入注册地址"
                            v-model="wxSumbitForm.merAddr"></el-input>
                </el-form-item>
                <div class="flex-start">
                  <el-form-item prop="businBegtime"
                                label-width="150px"
                                label="营业开始时间">
                    <el-time-picker v-model="wxSumbitForm.businBegtime"
                                    value-format="HHMM"
                                    format="HH:MM"
                                    @change="begtimeArrFn"
                                    placeholder="营业开始时间">
                    </el-time-picker>
                    <!-- <el-date-picker v-model="wxSumbitForm.businBegtime"
                                  type="datetime"
                                  value-format="HHMM"
                                  placeholder="营业开始时间"
                                  @change="begtimeArrFn">
                  </el-date-picker> -->
                  </el-form-item>

                  <el-form-item label-width="150px"
                                prop="businEndtime"
                                label="营业结束时间">
                    <el-time-picker v-model="wxSumbitForm.businEndtime"
                                    value-format="HHMM"
                                    format="HH:MM"
                                    @change="businEndtimeArrFn"
                                    placeholder="营业结束时间">
                    </el-time-picker>
                    <!-- <el-date-picker v-model="wxSumbitForm.businEndtime"
                                  type="datetime"
                                  value-format="HHMM"
                                  placeholder="营业执照结束时间"
                                  @change=" businEndtimeArrFn"> -->
                    <!-- </el-date-picker> -->
                  </el-form-item>
                </div>

                <el-form-item label="公司规模"
                              label-width="150px"
                              prop="employeeNum">
                  <el-radio-group v-model="wxSumbitForm.employeeNum">
                    <el-radio label="1">0-50人</el-radio>
                    <el-radio label="2">50-100人</el-radio>
                    <el-radio label="3">100上</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="经营形态"
                              label-width="150px"
                              prop="businForm">
                  <el-radio-group v-model="wxSumbitForm.businForm">
                    <el-radio label="01">连锁店</el-radio>
                    <el-radio label="02">普通店</el-radio>
                  </el-radio-group>
                </el-form-item>

                <!-- 经营信息 -->
                <div>
                  <h6 class="hLabel">附加信息</h6>
                  <el-form-item label="法定代表姓名"
                                label-width="150px"
                                prop="merLegal">
                    <el-input placeholder="请输入法定代表人姓名"
                              v-model="wxSumbitForm.merLegal"></el-input>
                  </el-form-item>
                  <el-form-item label="证件类型"
                                label-width="150px"
                                prop="legalType">
                    <el-select v-model="wxSumbitForm.legalType"
                               placeholder="请选择证件类型"
                               @change="
                        (event) => verifyChangesFn(event, 'qualificationType')
                      ">
                      <el-option v-for="item in legalTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                  <div class="flex-start">
                    <el-form-item label="法人身份证人像面"
                                  label-width="150px"
                                  prop="frontCorporateIDCard"
                                  class="positiveIDcards">
                      <el-upload action="#"
                                 ref="pictureFrontCorporateIDCard"
                                 :limit="1"
                                 :before-upload="beforeAvatarUpload"
                                 :on-exceed="exceedFn"
                                 :on-change="
                          (file, fileList) =>
                            handleFileChange(
                              file,
                              fileList,
                              'frontCorporateIDCard',
                              '01'
                            )
                        "
                                 list-type="picture-card"
                                 :auto-upload="false">
                        <i slot="default"
                           class="el-icon-download">
                          <div style="font-size: 14px; margin-top: 20px"
                               slot="default">点击上传</div>
                        </i>

                        <div slot="file"
                             slot-scope="{ file }">
                          <img class="el-upload-list__item-thumbnail"
                               :src="file.url"
                               alt="" />
                          <span class="el-upload-list__item-actions">
                            <span class="el-upload-list__item-preview"
                                  @click="handlePictureCardPreview(file)">
                              <i class="el-icon-zoom-in"></i>
                            </span>

                            <span class="el-upload-list__item-delete"
                                  @click="handleDownload(file)">
                              <i class="el-icon-download"></i>
                            </span>

                            <span class="el-upload-list__item-delete"
                                  @click="
                                handleRemove(file, 'frontCorporateIDCard')
                              ">
                              <i class="el-icon-delete"></i>
                            </span>
                          </span>
                        </div>
                      </el-upload>
                    </el-form-item>

                    <el-form-item label="法人身份证国徽面"
                                  label-width="150px"
                                  prop="certImageBack">
                      <el-upload action="#"
                                 :limit="1"
                                 list-type="picture-card"
                                 :on-exceed="exceedFn"
                                 :before-upload="beforeAvatarUpload"
                                 ref="pictureUploadCertImageBack"
                                 :on-change="
                          (file, fileList) =>
                            handleFileChange(
                              file,
                              fileList,
                              'certImageBack',
                              '02'
                            )
                        "
                                 :auto-upload="false">
                        <i slot="default"
                           class="el-icon-download">
                          <div style="font-size: 14px; margin-top: 20px"
                               slot="default">点击上传</div>
                        </i>

                        <div slot="file"
                             slot-scope="{ file }">
                          <img class="el-upload-list__item-thumbnail"
                               :src="file.url"
                               alt="" />
                          <span class="el-upload-list__item-actions">
                            <span class="el-upload-list__item-preview"
                                  @click="handlePictureCardPreview(file)">
                              <i class="el-icon-zoom-in"></i>
                            </span>

                            <span class="el-upload-list__item-delete"
                                  @click="handleDownload(file)">
                              <i class="el-icon-download"></i>
                            </span>

                            <span class="el-upload-list__item-delete"
                                  @click="handleRemove(file, 'certImageBack')">
                              <i class="el-icon-delete"></i>
                            </span>
                          </span>
                        </div>
                      </el-upload>
                    </el-form-item>
                  </div>
                  <el-form-item label="法人证件号码"
                                label-width="150px"
                                prop="legalCode">
                    <el-input placeholder="请输入法人证件号码"
                              v-model="wxSumbitForm.legalCode"></el-input>
                  </el-form-item>
                  <el-form-item label="证件有效期"
                                label-width="150px"
                                prop="legalValidity">
                    <el-date-picker v-model="wxSumbitForm.legalValidity"
                                    type="daterange"
                                    unlink-panels
                                    @change="legalValidityFn"
                                    range-separator="至"
                                    start-placeholder="开始日期"
                                    end-placeholder="结束日期"
                                    format="yyyy.MM.dd"
                                    value-format="yyyy.MM.dd"
                                    class="ele-fluid" />
                  </el-form-item>
                  <el-form-item label="手机号"
                                label-width="150px"
                                prop="legalPhone">
                    <el-input placeholder="请输入手机号"
                              v-model="wxSumbitForm.legalPhone"></el-input>
                  </el-form-item>
                  <el-form-item label="商户人姓名"
                                label-width="150px"
                                prop="linkMan">
                    <el-input placeholder="请输入商户人姓名"
                              v-model="wxSumbitForm.linkMan"></el-input>
                  </el-form-item>
                  <el-form-item label="商户联系人证件类型"
                                label-width="150px"
                                prop="linkmanType">
                    <el-select v-model="wxSumbitForm.linkmanType"
                               placeholder="请输入商户联系人证件类型"
                               @change="verifyChangesFn">
                      <el-option v-for="item in linkmanTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="商户人证件号码"
                                label-width="150px"
                                prop="linkmanCode">
                    <el-input placeholder="请输入商户证件类型"
                              v-model="wxSumbitForm.linkmanCode"
                              show-password></el-input>
                  </el-form-item>
                  <el-form-item label="商户人证件有效期"
                                label-width="150px"
                                prop="linkmanValidity">
                    <el-date-picker v-model="wxSumbitForm.linkmanValidity"
                                    type="daterange"
                                    unlink-panels
                                    @change="linkmanValidityFn"
                                    range-separator="至"
                                    start-placeholder="开始日期"
                                    end-placeholder="结束日期"
                                    format="yyyy.MM.dd"
                                    value-format="yyyy.MM.dd"
                                    class="ele-fluid" />
                  </el-form-item>
                  <el-form-item label="商户人联系人手机号"
                                label-width="150px"
                                prop="linkmanPhone">
                    <el-input placeholder="请输入商户人联系人手机号"
                              v-model="wxSumbitForm.linkmanPhone"></el-input>
                  </el-form-item>
                </div>

                <div class="fromSubmitTwo">
                  <h6 class="hLabel">营业执照信息</h6>
                  <el-form-item label="营业执照图片"
                                v-if="merModeSelect !== 3"
                                label-width="150px"
                                prop="businessLicense">
                    <el-upload action="#"
                               ref="pictureUploadBusinessLicense"
                               list-type="picture-card"
                               :before-upload="beforeAvatarUpload"
                               :limit="5"
                               :on-exceed="exceedFn"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(
                            file,
                            fileList,
                            'businessLicense',
                            '05'
                          )
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <!-- 图片的预览 -->
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <!-- 图片的下载 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>
                          <!-- 图片的移除 -->
                          <span v-if="!disabled"
                                class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'businessLicense')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="门头照片"
                                label-width="150px"
                                prop="certImage"
                                class="positiveIDcards">
                    <el-upload action="#"
                               ref="pictureUploadDoorPhoto"
                               :limit="5"
                               :auto-upload="false"
                               :on-exceed="exceedFn"
                               :before-upload="beforeAvatarUpload"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'doorPhoto', '08')
                      "
                               list-type="picture-card">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'doorPhoto')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="门牌号"
                                v-if="merModeSelect == 1"
                                label-width="150px"
                                prop="houseNumber">
                    <el-upload action="#"
                               list-type="picture-card"
                               :limit="5"
                               :file-list="mphList"
                               :on-exceed="exceedFn"
                               :before-upload="beforeAvatarUpload"
                               ref="pictureUploadHouseNumber"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'houseNumber', '09')
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'houseNumber')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="收银台"
                                label-width="150px"
                                prop="certImage"
                                class="positiveIDcards">
                    <el-upload action="#"
                               ref="pictureUploadCashier"
                               :limit="5"
                               :file-list="sytList"
                               :on-exceed="exceedFn"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(file, fileList, 'cashier', '06')
                      "
                               list-type="picture-card"
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'cashier')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="内部环境照片"
                                label-width="150px"
                                prop="internalEnvironment">
                    <el-upload action="#"
                               list-type="picture-card"
                               :limit="5"
                               :file-list="nbhjzList"
                               :on-exceed="exceedFn"
                               :before-upload="beforeAvatarUpload"
                               ref="pictureInternalEnvironment"
                               :on-change="
                        (file, fileList) =>
                          handleFileChange(
                            file,
                            fileList,
                            'internalEnvironment',
                            '07'
                          )
                      "
                               :auto-upload="false">
                      <i slot="default"
                         class="el-icon-download">
                        <div style="font-size: 14px; margin-top: 20px"
                             slot="default">点击上传</div>
                      </i>

                      <div slot="file"
                           slot-scope="{ file }">
                        <img class="el-upload-list__item-thumbnail"
                             :src="file.url"
                             alt="" />
                        <span class="el-upload-list__item-actions">
                          <span class="el-upload-list__item-preview"
                                @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                          </span>

                          <span class="el-upload-list__item-delete"
                                @click="handleRemove(file, 'internalEnvironment')">
                            <i class="el-icon-delete"></i>
                          </span>
                        </span>
                      </div>
                    </el-upload>
                  </el-form-item>

                  <el-form-item label="营业执照类型"
                                label-width="150px"
                                prop="licenseType">
                    <el-select v-model="wxSumbitForm.licenseType"
                               placeholder="请选择营业执照类型"
                               @change="verifyChangesFn">
                      <el-option v-for="item in licenseTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="营业执照证件有效期"
                                label-width="150px"
                                prop="licValidity">
                    <el-date-picker v-model="wxSumbitForm.licValidity"
                                    type="daterange"
                                    unlink-panels
                                    @change="licValidityFn"
                                    range-separator="至"
                                    start-placeholder="开始日期"
                                    end-placeholder="结束日期"
                                    format="yyyy.MM.dd"
                                    value-format="yyyy.MM.dd"
                                    class="ele-fluid" />
                  </el-form-item>
                  <el-form-item label="统一社会信用码"
                                label-width="150px"
                                prop="merLic">
                    <el-input placeholder="请输入工商注册号/统一社会信用码"
                              v-model="wxSumbitForm.merLic"></el-input>
                  </el-form-item>
                  <el-form-item label="主营业务"
                                label-width="150px"
                                prop="businScope">
                    <el-input placeholder="请输入主要经营业务"
                              v-model="wxSumbitForm.businScope"></el-input>
                  </el-form-item>
                  <el-form-item label="注册资本"
                                label-width="150px"
                                prop="capital">
                    <el-input placeholder="请输入注册资本"
                              v-model="wxSumbitForm.capital"></el-input>
                  </el-form-item>
                  <el-form-item label="注册地址"
                                label-width="150px"
                                prop="licAddr">
                    <el-input placeholder="请输入注册地址"
                              v-model="wxSumbitForm.licAddr"></el-input>
                  </el-form-item>

                  <el-form-item label="实际控制人姓名"
                                label-width="150px"
                                prop="controlerName">
                    <el-input placeholder="请输入实际控制人姓名"
                              v-model="wxSumbitForm.controlerName"></el-input>
                  </el-form-item>
                  <el-form-item label="实际控制人证件号码"
                                label-width="150px"
                                prop="controlerLegalCode">
                    <el-input placeholder="请输入实际控制人证件号码"
                              v-model="wxSumbitForm.controlerLegalCode"
                              show-password></el-input>
                  </el-form-item>
                  <el-form-item label="实际控制人证件种类"
                                label-width="150px"
                                prop="controlerLegalType">
                    <el-select v-model="wxSumbitForm.controlerLegalType"
                               placeholder="请输入实际控制人证件种类"
                               @change="controlerLegalTypeFn">
                      <el-option v-for="item in controlerLegalTypeOptions"
                                 :key="item.value"
                                 :label="item.label"
                                 :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>

                  <el-form-item label="控制人证件有效期"
                                label-width="150px"
                                prop="controlerLegalValidity">
                    <el-date-picker v-model="wxSumbitForm.controlerLegalValidity"
                                    type="daterange"
                                    unlink-panels
                                    @change="controlerLegalValidityFn"
                                    range-separator="至"
                                    start-placeholder="开始日期"
                                    end-placeholder="结束日期"
                                    format="yyyy.MM.dd"
                                    value-format="yyyy.MM.dd"
                                    class="ele-fluid" />
                  </el-form-item>
                </div>
              </div>
              <!-- 经营信息 -->

              <!-- 结算到银行卡 -->
              <div v-if="successfulStatus == '3'">
                <h6 class="hLabel">结算到银行卡</h6>
                <el-form-item label="账户类型"
                              label-width="150px"
                              prop="accType">
                  <el-radio-group @change="accTypeFn"
                                  v-model="wxSumbitForm.accType">
                    <el-radio label="00">个人(对私)</el-radio>
                    <el-radio label="10">对公账户</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="开户行名称"
                              label-width="150px"
                              prop="bankName">
                  <el-select v-model="wxSumbitForm.bankName"
                             placeholder="请输入开户行名称"
                             @change="accountBankFn">
                    <el-option v-for="item in accountBankOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="开户行行号"
                              label-width="150px"
                              prop="bankCode">
                  <el-input placeholder="请输入开户行行号"
                            v-model="wxSumbitForm.bankCode"></el-input>
                </el-form-item>
                <el-form-item label="开户行账号"
                              label-width="150px"
                              prop="account">
                  <el-input placeholder="请输入开户行账号"
                            v-model="wxSumbitForm.account"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="账户名称"
                              label-width="150px"
                              prop="accName">
                  <el-input placeholder="请输入账户名称"
                            v-model="wxSumbitForm.accName"></el-input>
                </el-form-item>

                <el-form-item label="证件类型"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="legalType">
                  <el-select v-model="wxSumbitForm.legalType"
                             placeholder="请选择证件类型"
                             @change="
                      (event) => verifyChangesFn(event, 'qualificationType')
                    ">
                    <el-option v-for="item in legalTypeOptions"
                               :key="item.value"
                               :label="item.label"
                               :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="证件号"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="legalCode">
                  <el-input placeholder="请输入证件号"
                            v-model="wxSumbitForm.legalCode"
                            show-password></el-input>
                </el-form-item>
                <el-form-item label="对私手机号"
                              v-if="accTypeSelect == '00'"
                              label-width="150px"
                              prop="accPhone">
                  <el-input placeholder="请输入对私手机号"
                            v-model="wxSumbitForm.accPhone"></el-input>
                </el-form-item>
                <el-form-item label="银行卡"
                              label-width="150px"
                              prop="privateBankCard">
                  <el-upload action="#"
                             list-type="picture-card"
                             :on-exceed="exceedFn"
                             :before-upload="beforeAvatarUpload"
                             ref="pictureUploadPrivateBankCard"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(
                          file,
                          fileList,
                          'privateBankCard',
                          '14'
                        )
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'privateBankCard')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>
                <el-form-item label="清算授权书"
                              label-width="150px"
                              prop="clearingAuthorizationLetter">
                  <el-upload action="#"
                             list-type="picture-card"
                             :on-exceed="exceedFn"
                             :before-upload="beforeAvatarUpload"
                             ref="pictureClearingAuthorizationLetter"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(
                          file,
                          fileList,
                          'clearingAuthorizationLetter',
                          '15'
                        )
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'certImageBack')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>
                <el-form-item label="开户许可证"
                              v-if="!(accTypeSelect == '00')"
                              label-width="150px"
                              prop="accountOpeningPermit">
                  <el-upload action="#"
                             list-type="picture-card"
                             :on-exceed="exceedFn"
                             :before-upload="beforeAvatarUpload"
                             ref="pictureAccountOpeningPermit"
                             :on-change="
                      (file, fileList) =>
                        handleFileChange(
                          file,
                          fileList,
                          'accountOpeningPermit',
                          '13'
                        )
                    "
                             :auto-upload="false">
                    <i slot="default"
                       class="el-icon-download">
                      <div style="font-size: 14px; margin-top: 20px"
                           slot="default">点击上传</div>
                    </i>

                    <div slot="file"
                         slot-scope="{ file }">
                      <img class="el-upload-list__item-thumbnail"
                           :src="file.url"
                           alt="" />
                      <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview"
                              @click="handlePictureCardPreview(file)">
                          <i class="el-icon-zoom-in"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleDownload(file)">
                          <i class="el-icon-download"></i>
                        </span>

                        <span class="el-upload-list__item-delete"
                              @click="handleRemove(file, 'accountOpeningPermit')">
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                </el-form-item>
              </div>
              <div class="drawer__footer">
                <el-button type="primary"
                           :loading="disable"
                           @click="
                    submitFnChangeInformation(
                      'wxSumbitForm',
                      successfulStatus,
                      supplementInfo
                    )
                  ">变更</el-button>
              </div>
            </el-form>
          </div>
        </div>
      </div>
      <el-row :gutter="10"
              v-if="!(incomingStatus == '00') && !(incomingStatus == '10')">
        <el-col v-bind="styleResponsive ? { lg: 24, md: 12 } : { span: 24 }">
          <!-- // 需要根据当前的状态判断当前进件走到什么地方了  9-待处理；3-待审核；0-审核通过；X-审核失败；1-审核驳回；5-待签约  10-补件 -->

          <div class="fromSubmitThree"
               v-if="incomingStatus == '9'"
               :style="{ height: rowActiveHight + 'px' }">
            <img src="../../../static/examineing.png"
                 alt="" />
            <div class="examine">待处理中</div>
            <div style="color: '#666'">您进件资料待处理中,请前往oem代理进行处理,请耐心等待~</div>
            <!-- <el-button class="closePage"
                       @click="businessDetailFn"
                       round>查看详情</el-button> -->
          </div>

          <div class="fromSubmitThree"
               v-if="incomingStatus == 'X'">
            <img src="../../../static/examineFail.png"
                 alt="" />
            <div class="examine"
                 style="color: #ff4d4f">审核失败</div>
            <div>{{ rejectReason }}</div>

            <div class="resubmit"
                 @click="restSubmit"
                 round>重新提交</div>
          </div>
          <div class="fromSubmitThree"
               :style="{ height: rowActiveHight + 'px' }"
               v-if="incomingStatus == '5'">
            <img src="../../../static/examineing.png"
                 alt="" />
            <div class="examine">待签约
            </div>
            <div style="color: '#666'">你的进件为待签约状态，注意短信通知及时发起签约</div>
          </div>
          <div class="fromSubmitThree"
               v-if="incomingStatus == '3'"
               :style="{ height: rowActiveHight + 'px' }">
            <img src="../../../static/examineing.png"
                 alt="" />
            <div class="examine">待审核</div>
            <div style="color: '#666'">资料待用户验证,请耐心等待~</div>
          </div>

          <div class="fromSubmitThree"
               :style="{ height: rowActiveHight + 'px' }"
               v-if="
              incomingStatus == '0' &&
              successfulStatus !== '1' &&
              successfulStatus !== '2' &&
              successfulStatus !== '3'
            ">
            <img src="../../../static/examineFail.png"
                 alt="" />
            <div class="examine"
                 style="color: #1890ff">审核通过</div>
            <div>{{
              supplementInfo.rejectReason ? supplementInfo.rejectReason : ''
            }}</div>

            <div class="successSubmit"
                 @click="businessViewDetailFn()"
                 round>查看详情</div>
            <!--  :disbale=supplementInfo.changeStatus==2?false:true -->
            <div class="flex"
                 style="margin-top: 30px">
              <el-button type="primary"
                         :loading="disable"
                         :disbale='supplementInfo.changeStatus==2?false:true'
                         @click="changeStatusFn('1')">商户功能变更</el-button>
              <el-button type="primary"
                         :loading="disable"
                         :disbale='supplementInfo.changeStatus==2?false:true'
                         @click="changeStatusFn('3')">结算账户变更</el-button>
              <el-button type="primary"
                         :loading="disable"
                         :disbale='supplementInfo.changeStatus==2?false:true'
                         @click="changeStatusFn('2')">商户信息变更</el-button>
            </div>
          </div>

          <div class="fromSubmitThree"
               v-if="incomingStatus == '1'"
               :style="{ height: rowActiveHight + 'px' }">
            <img src="../../../static/examineFail.png"
                 alt="" />
            <div class="examine"
                 style="color: #ff4d4f">审核驳回</div>
            <div>驳回原因{{ supplementInfo?.rejectReason }}</div>
            <div class="resubmit"
                 @click="supplementFn('wxSumbitForm')"
                 round>重新补件</div>
          </div>
        </el-col>
      </el-row>
    </el-card>

    <UserEdit :visible.sync="showEdit"
              :data="current"></UserEdit>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%"
           :src="dialogImageUrl"
           alt="" />
    </el-dialog>
  </div>
</template>

<script>
import { getToken } from '@/utils/token-util';
import { userOssSignature } from '@/api/creatCenter/material';
import UserSearch from './components/user-search.vue';
import UserEdit from './components/user-edit.vue';
import UserImport from './components/user-import.vue';
import EquipmentEdit from './components/equipment-edit.vue';
import RegionsSelect from '@/components/RegionsSelect/index.vue';
import { getRegionLabel } from 'ele-admin/packages/utils/regions';
import incomingDetails from './components/incomingDetails.vue';
import {
  wxGetUploadMediaId,
  wxSumbitMerchantApplyFor,
  zfbGetUploadMediaId,
  zfbMerchantCreate,
  wechatpayGenerate,
  selectByPrimaryKey,
  upload111,
  newMerApplyFor,
  merPatchSupplement,
  getMerenterInfo,
  merInfoChange,
  accInfoChange,
  funcInfoChange,
  funcInfoChangeApplyFor
} from '@/api/douApi';
import {
  pageMerchant,
  removeUsers,
  updateUserStatus,
  resetPassword,
  updateUserPassword,
  pageAgencyType,
  getSecondlevelAgent
} from '@/api/oem';
import {
  certTypeList,
  mccOptions,
  optionsServiceList,
  qualificationTypeOptions,
  accountBankOptions,
  bankAccountTypeOptions,
  usageTypeOptions,
  accountTypeOptions,
  controlerLegalTypeOptions,
  rules,
  list,
  idDocTypeOptions,
  wxSumbitForm,
  plusInfoOptions,
  licenseTypeOptions,
  //   validateLogo,
  //   storeEntrancePicLogo,
  //   indoorPicLogo,
  //   idCardCopyLogo,
  //   idCardNationalLogo,
  //   qualificationsLogo,
  //   outDoorImagesLogo,
  //   inDoorImagesLogo,
  //   certImageLogo,
  //   certImageBackLogo,
  zfbSumbitForm,
  linkmanTypeOptions,
  legalTypeOptions
} from './constant/constant';
import { JSEncrypt } from 'jsencrypt';
// 导入组件
import { getDianShu } from '@/api/system/user';
import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
import Steps from '@/components/Steps/Steps.vue';
import axios from 'axios';
export default {
  name: 'SystemUser',
  components: {
    incomingDetails,
    UserSearch,
    EquipmentEdit,
    UserEdit,
    UserImport,
    ElImageViewer,
    Steps,
    RegionsSelect
  },
  data () {
    //   validateLogo;
    //   storeEntrancePicLogo,
    //   indoorPicLogo,
    //   idCardCopyLogo,
    //   idCardNationalLogo,
    //   qualificationsLogo,
    //   outDoorImagesLogo,
    //   inDoorImagesLogo,
    //   certImageLogo,
    //   certImageBackLogo;

    return {
      licenseTypeOptions,
      wxSumbitForm,
      certTypeList,
      legalTypeOptions,
      controlerLegalTypeOptions,
      mccOptions,
      optionsServiceList,
      qualificationTypeOptions,
      accountBankOptions,
      bankAccountTypeOptions,
      usageTypeOptions,
      accountTypeOptions,
      linkmanTypeOptions,
      rules,
      list,
      idDocTypeOptions,
      zfbSumbitForm,
      windowHeight: document.documentElement.clientHeight - 110,
      rowActiveHight: document.documentElement.clientHeight - 160,
      radio: '',
      //   二级代理id
      agentId: '',
      //   测试
      test: false,
      //选择商户经营类型
      accTypeSelect: '00',

      merModeSelect: 1,
      // 当前编辑数据
      current: null,
      // 是否显示编辑弹窗
      showEdit: false,
      // 当被限制显示最新的图片
      isImageUrl: false,
      imageUrl: '',
      dialogImageUrl: '',
      //   查看详情列表
      detailsList: [],
      disabled: false,
      // 是否弹框
      drawer: false,
      // 代理类型list
      typeList: [],
      // 表格选中数据
      selection: [],
      // 当前编辑数据
      current: null,
      // 是否显示编辑弹窗
      showEdit: false,
      // 是否显示导入弹窗
      showImport: false,
      //是否显示划拨编辑弹窗
      showTransfer: false,
      showViewer: false, // 显示查看器
      // 进件状态
      incomingStatus: '00',
      // 状态 1 为 微信 2 为支付宝 3为查看详情
      jjstatus: '',

      //   labelPosition right/left/top

      labelPosition: 'right',
      //图片数量
      listLength: 0,
      // 图片文件列表
      fileListSelect: [],

      // 图片列表
      pictureList: [],

      // 签约弹框
      visibleModal: false,

      //   选择进件类型 1为微信 2 为支付宝
      selectIncomingTypeStatus: 1,

      // 判断当前是否已经进件 1未进件 2 微信进件 3 支付宝进件 4.重新提交
      IncomingOrNot: 1,
      //  图片弹框
      dialogVisible: false,

      // 是否显示开户银行联合号 和开户银行全称
      otherBanks: false,

      //   加载中
      loading: false,
      // 微信存储的图片
      wxPictureArr: [],
      // 支付宝存储的图片
      zfbPictureArr: [],
      disable: false,

      // 查看详情索引
      incomingIndex: '',
      //   签约二维码
      signUrl: '',
      //   驳回原因
      rejectReason: '',
      loadingResubmit: true,
      //  驳回需要传的id
      resubmitId: {},
      //   营业执照图片列表
      licenseCopyFileList: [],
      //  门头照片图片列表
      storeEntrancePicFileList: [],
      //   办公环境图片列表
      indoorPicFileList: [],
      // 特殊资质图片列表
      qualificationsFileList: [],
      // 正面身份证图片列表
      idCardCopyFileList: [],
      // 反面身份证图片列表
      idCardNationalFileList: [],
      //   这里需要定义一个状态 如果在重新提交的时候删除了或者删除了需要改变状态默认为false
      restSubmitStatus: false,
      //  驳回数据回显
      rejectReasonObject: {},
      fileList: [],
      // 当前变更状态
      successfulStatus: '',
      //   图片id
      frsfzRxFileid: '659d1e923e10af1bbb1f8c7b',
      frsfzGhFileid: '659d1ec23e10af1bbb1f8cb7',
      yyzzFileid: '659d1f243e10af1bbb1f8ce7',
      sytFileid: '659d1fae3e10af1bbb1f8d2a',
      nbhjzFileid: '659d1f4b3e10af1bbb1f8cfc',
      yycsmtzFileid: '659d1f6f3e10af1bbb1f8d0c',
      mphFileid: '659d1f883e10af1bbb1f8d1a',

      khxkzFileid: '659d1e923e10af1bbb1f8c7b',
      yhkFileid: '659d1ec23e10af1bbb1f8cb7',
      qssqsFileid: '659d1f243e10af1bbb1f8ce7',
      //   网络图片
      frsfzRxUrl: '',
      frsfzGhUr: '',
      yyzzUrl: '',
      sytUrl: '',
      nbhjzUrl: '',
      yycsmtzUrl: '',
      mphUr: '',

      khxkzUrl: '',
      yhkUrl: '',
      qssqsUrl: '',

      //存图片唯一id
      frsfzRxArr: [],
      frsfzGhArr: [],
      yyzzArr: [],
      sytArr: [],
      nbhjzArr: [],
      yycsmtzArr: [],
      mphArr: [],
      yhkArr: [],
      qssqsArr: [],
      khxkArr: [],
      //存网络图片
      frsfzRxArrUrl: [],
      frsfzGhArrUrl: [],
      yyzzArrUrl: [],
      sytArrUrl: [],
      nbhjzArrUrl: [],
      yycsmtzArrUrl: [],
      mphArrUrl: [],
      yhkArrUrl: [],
      qssqsArrUrl: [],
      khxkArrUrl: [],
      // 图片展示列表
      frsfzRxList: [],
      frsfzGhList: [],
      yyzzList: [],
      sytList: [],
      nbhjzList: [],
      yycsmtzList: [],
      mphList: [],
      yhkList: [],
      qssqsList: [],
      khxkList: [],

      supplementInfoUrl: null,
      // 商户信息变更
      merInfoChangeObject: null,
      // 结算账户变更
      accInfoChangeObject: null,
      // 商户功能变更
      funcInfoChangeObject: null,
      funcType: '1',
      loading: false,
      //  变更状态
      changeStatus: false,
      uploadStatus: false

    };
  },

  mounted () { },

  // 路由刷新
  async activated () {
    this.getSecondlevelAgentFn();
    this.query();
  },

  created () {
    this.initRules();
  },
  computed: {
    // 是否开启响应式布局
    styleResponsive () {
      return this.$store.state.theme.styleResponsive;
    },
    classAlipayAccount () {
      return {
        'active-enterprise':
          this.zfbSumbitForm.defaultSettleType === 'alipayAccount',
        enterprise: this.zfbSumbitForm.defaultSettleType !== 'alipayAccount'
      };
    },
    certNoPattern () {
      return this.zfbSumbitForm?.merchantType !== '06'
        ? /^[A-Z0-9]{18}$/
        : /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
    },
    certNoMessage () {
      return this.zfbSumbitForm?.merchantType !== '06'
        ? '营业执照上的注册号/统一社会信用代码格式不对'
        : '身份证输入不合法';
    },
    IncomingStatus () {
      return function (index) {
        if (index == 1) {
          return '未进件';
        } else if (index == 2) {
          return '微信进件';
        } else if (index == 3) {
          return '支付宝进件';
        } else if (index == 4) {
          return '重新进件';
        }
      };
    },
    customStyle () {
      return {
        color: this.IncomingOrNot == 4 ? 'red' : ''
      };
    }
  },

  methods: {
    // 提交变更信息
    submitFnChangeInformation (formName, changeStatus, supplementInfo) {
      console.log(formName, changeStatus);
      this.$refs[formName].validate(async (valid) => {
        if (valid) {
          if (changeStatus == 3) {
            this.accInfoChangeFn();
          } else if (changeStatus == 2) {
            this.merInfoChangeFn();
          } else if (changeStatus == 1) {
            this.funcInfoChangeFn();
          }
        } else {
          this.$message.error('参数填充有误,请填写完整参数在提交111');
          return false;
        }
      });
    },
    //  变更状态函数
    async changeStatusFn (status) {
      // successfulStatus
      this.successfulStatus = status;
      //   把最新的提交的表单进行替换
      if (status == '3') {
        if (this.supplementInfo.dsfAccinfo.accType == '00') {
          this.$util.assignObject(this.wxSumbitForm, {
            ...this.supplementInfo.dsfAccinfo
          });
        } else {
          this.$util.assignObject(this.wxSumbitForm, {
            ...this.supplementInfo.dsfAccinfo
          });
        }
      } else if (status == '2') {
        this.$util.assignObject(this.wxSumbitForm, {
          ...this.supplementInfo.dsfMerinfo,
          ...this.supplementInfo.dsfPlusinfo,
          ...this.supplementInfo.dsfLicinfo
        });
        // 需要对 证件有效期 商户人证件有效期 营业执照证件有效期 控制人证件有效期 的时间格式化
        this.wxSumbitForm.legalValidity = JSON.parse(
          this.wxSumbitForm.legalValidity
        );
        this.wxSumbitForm.linkmanValidity = JSON.parse(
          this.wxSumbitForm.linkmanValidity
        );
        this.wxSumbitForm.licValidity = JSON.parse(
          this.wxSumbitForm.licValidity
        );
        this.wxSumbitForm.controlerLegalValidity = JSON.parse(
          this.wxSumbitForm.controlerLegalValidity
        );
        this.imageEcho();
        console.log(this.wxSumbitForm);
      } else if (status == '1') {
        this.selectIncomingTypeStatus = this.supplementInfo.funcType
        this.funcType = this.supplementInfo.funcType

        // console.log(this.supplementInfo)
        // this.wxSumbitForm.funcType = this.supplementInfo.funcType
        // this.selectIncomingTypeStatus = this.supplementInfo.funcType
      }
    },

    // 查看详情

    businessViewDetailFn () {
      this.drawer = true;
    },

    // 功能变更 （功能变更 1 商户信息变更 2 商户信息变更 3）
    async funcInfoChangeFn () {

      // console.log(this.funcType)
      const res = await funcInfoChangeApplyFor({
        merTrace: this.supplementInfo.merTrace,
        funcType: this.funcType,
        id: this.supplementInfo.id,
        oemId: this.agentId,

      });

      console.log(res)
      if (res.code == 2000) {
        this.$message.success(res.msg)
        this.$router.go(0)
      } else {
        this.$message.error(res.msg)
      }

    },
    // 结算账户变更
    async accInfoChangeFn () {
      if ((this.wxSumbitForm.accType == '00' && this.wxSumbitForm.merMode == '0')) {
        if (!this.yhkFileid) {
          this.$message.error('请上传银行卡');
          return;
        }
        if (!this.qssqsFileid) {
          this.$message.error('请上传清算授权书');
          return;
        }
        const accInfoChangeObject = {
          dsfAccinfo: {
            bankName: this.wxSumbitForm.bankName,
            bankCode: this.wxSumbitForm.bankCode,
            account: this.wxSumbitForm.account,
            accName: this.wxSumbitForm.accName,
            accType: this.wxSumbitForm.accType,
            legalType: this.wxSumbitForm.legalType,
            id: this.supplementInfo.dsfAccinfo.id,
            legalCode: this.wxSumbitForm.legalCode,
            accPhone: this.wxSumbitForm.accPhone
          },
          // 结算账户信息2
          dsfAccinfoTwo: {
            bankName: this.wxSumbitForm.bankName,
            bankCode: this.wxSumbitForm.bankCode,
            account: this.wxSumbitForm.account,
            accName: this.wxSumbitForm.accName,
            id: this.supplementInfo.dsfAccinfoTwo.id,
            accType: '10'
          },
          merTrace: this.supplementInfo.merTrace,

          yhkFileid: this.yhkFileid,
          qssqsFileid: this.qssqsFileid,
          id: this.supplementInfo.id,
          oemId: this.agentId
        };
        console.log(accInfoChangeObject);
        const res = await accInfoChange({
          ...accInfoChangeObject
        });
        if (res.code == 2000) {
          this.$message.success(res.msg)
          this.$router.go(0)
        } else {
          this.$message.error(res.msg)
        }
      } else if (this.wxSumbitForm.accType == '10') {
        if (!this.khxkzFileid) {
          this.$message.error('请上传开户许可证');
          return;
        }
        const accInfoChangeObject = {
          dsfAccinfo: {
            bankName: this.wxSumbitForm.bankName,
            bankCode: this.wxSumbitForm.bankCode,
            account: this.wxSumbitForm.account,
            accName: this.wxSumbitForm.accName,
            accType: this.wxSumbitForm.accType,
            id: this.supplementInfo.dsfAccinfo.id
          },
          // 结算账户信息2
          merTrace: this.supplementInfo.merTrace,
          khxkzFileid: this.khxkzFileid,
          id: this.supplementInfo.id,
          oemId: this.agentId
        };
        console.log(accInfoChangeObject);
        const res = await accInfoChange({
          ...accInfoChangeObject
        });
        console.log(res);

        if (res.code == 2000) {
          this.$message.success(res.msg)
          this.$router.go(0)
        } else {
          this.$message.error(res.msg)
        }
      } else {
        if (!this.yhkFileid) {
          this.$message.error('请上传银行卡');
          return;
        }
        if (!this.qssqsFileid) {
          this.$message.error('请上传清算授权书');
          return;
        }
        const accInfoChangeObject = {
          dsfAccinfo: {
            bankName: this.wxSumbitForm.bankName,
            bankCode: this.wxSumbitForm.bankCode,
            account: this.wxSumbitForm.account,
            accName: this.wxSumbitForm.accName,
            accType: this.wxSumbitForm.accType,
            legalType: this.wxSumbitForm.legalType,
            id: this.supplementInfo.dsfAccinfo.id,
            legalCode: this.wxSumbitForm.legalCode,
            accPhone: this.wxSumbitForm.accPhone
          },

          merTrace: this.supplementInfo.merTrace,

          yhkFileid: this.yhkFileid,
          qssqsFileid: this.qssqsFileid,
          id: this.supplementInfo.id,
          oemId: this.agentId
        };
        console.log(accInfoChangeObject);
        const res = await accInfoChange({
          ...accInfoChangeObject
        });
        if (res.code == 2000) {
          this.$message.success(res.msg)
          this.$router.go(0)
        } else {
          this.$message.error(res.msg)
        }
      }
    },
    // 商户信息变更
    async merInfoChangeFn () {
      if (!this.frsfzRxFileid) {
        this.$message.error('请上传身份证正面');
        return;
      }

      if (!this.frsfzGhFileid) {
        this.$message.error('请上传身份证反面');
        return;
      }

      if (!this.yyzzFileid) {
        this.$message.error('请上传营业执照');
        return;
      }
      if (!this.sytFileid) {
        this.$message.error('请上传收银台照片');
        return;
      }
      if (!this.nbhjzFileid) {
        this.$message.error('请上传内部环境照片');
        return;
      }
      if (!this.yycsmtzFileid) {
        this.$message.error('请上传门头照片');
        return;
      }

      if (!this.mphFileid) {
        this.$message.error('请上传门牌照');
        return;
      }
      const merInfoChangeObject = {
        // 商家信息
        dsfMerinfo: {
          merMode: this.wxSumbitForm.merMode,
          merName: this.wxSumbitForm.merName,
          businName: this.wxSumbitForm.businName,
          merType: this.wxSumbitForm.merType,
          standardFlag: this.wxSumbitForm.standardFlag,
          merArea: this.wxSumbitForm.merArea,
          merAddr: this.wxSumbitForm.merAddr,
          businBegtime: this.wxSumbitForm.businBegtime,
          businEndtime: this.wxSumbitForm.businEndtime,
          employeeNum: this.wxSumbitForm.employeeNum,
          businForm: this.wxSumbitForm.businForm,
          id: this.supplementInfo.dsfMerinfo.id
        },
        // 营业执照
        dsfLicinfo: {
          merLic: this.wxSumbitForm.merLic,
          licenseType: this.wxSumbitForm.licenseType,
          licValidity: JSON.stringify(this.wxSumbitForm.licValidity),
          businScope: this.wxSumbitForm.businScope,
          capital: this.wxSumbitForm.capital,
          licAddr: this.wxSumbitForm.licAddr,
          controlerName: this.wxSumbitForm.controlerName,
          controlerLegalCode: this.wxSumbitForm.controlerLegalCode,
          controlerLegalType: this.wxSumbitForm.controlerLegalType,
          controlerLegalValidity: JSON.stringify(
            this.wxSumbitForm.controlerLegalValidity
          ),
          id: this.supplementInfo.dsfLicinfo.id
        },

        // 附加信息
        dsfPlusinfo: {
          merLegal: this.wxSumbitForm.merLegal,
          legalType: this.wxSumbitForm.legalType,
          legalCode: this.wxSumbitForm.legalCode,
          legalValidity: JSON.stringify(this.wxSumbitForm.legalValidity),
          legalPhone: this.wxSumbitForm.legalPhone,
          linkMan: this.wxSumbitForm.linkMan,
          linkmanType: this.wxSumbitForm.linkmanType,
          linkmanCode: this.wxSumbitForm.linkmanCode,
          linkmanValidity: JSON.stringify(this.wxSumbitForm.linkmanValidity),
          linkmanPhone: this.wxSumbitForm.linkmanPhone,
          id: this.supplementInfo.dsfPlusinfo.id
        },
        merTrace: this.supplementInfo.merTrace,

        frsfzRxFileid: this.frsfzRxFileid,
        frsfzGhFileid: this.frsfzGhFileid,
        yyzzFileid: this.yyzzFileid,
        sytFileid: this.sytFileid,
        nbhjzFileid: this.nbhjzFileid,
        yycsmtzFileid: this.yycsmtzFileid,
        mphFileid: this.mphFileid,
        id: this.supplementInfo.id,
        oemId: this.agentId
      };
      console.log(merInfoChangeObject);

      const res = await merInfoChange({
        ...merInfoChangeObject
      });
      if (res.code == 2000) {
        this.$message.success(res.msg)
        this.$router.go(0)
      } else {
        this.$message.error(res.msg)
      }
    },

    async query () {
      const res = await getMerenterInfo({
        merchantId: this.$store.state.user.info.merchantId
      });
      console.log(res);

      // 需要根据当前的状态判断当前进件走到什么地方了  9-待处理；3-待审核；0-审核通过；X-审核失败；1-审核驳回；5-待签约

      if (res.code == 2000 && res.data) {
        console.log(res.data);
        // 返回当前的状态
        this.incomingStatus = res.data.status;
        this.supplementInfo = res.data;
      }
      this.loadingResubmit = false;
    },
    async supplementFn () {
      this.incomingStatus = '10';
      this.$util.assignObject(this.wxSumbitForm, {
        ...this.supplementInfo.dsfMerinfo,
        ...this.supplementInfo.dsfPlusinfo,
        ...this.supplementInfo.dsfLicinfo,
        ...this.supplementInfo.dsfAccinfo
        // ...this.supplementInfo.dsfAccinfoTwo
      });
      this.wxSumbitForm.legalValidity = JSON.parse(
        this.wxSumbitForm.legalValidity
      );
      this.wxSumbitForm.linkmanValidity = JSON.parse(
        this.wxSumbitForm.linkmanValidity
      );
      this.wxSumbitForm.licValidity = JSON.parse(
        this.wxSumbitForm.licValidity
      );
      this.wxSumbitForm.controlerLegalValidity = JSON.parse(
        this.wxSumbitForm.controlerLegalValidity
      );
      //图片id
      this.frsfzRxFileid = this.supplementInfo.frsfzRxFileid;
      this.frsfzGhFileid = this.supplementInfo.frsfzGhFileid;
      this.yyzzFileid = this.supplementInfo.yyzzFileid;
      this.sytFileid = this.supplementInfo.sytFileid;
      this.nbhjzFileid = this.supplementInfo.nbhjzFileid;
      this.yycsmtzFileid = this.supplementInfo.yycsmtzFileid;
      this.mphFileid = this.supplementInfo.mphFileid;
      //网络图片
      this.frsfzRxUrl = this.supplementInfo.frsfzRxUrl;
      this.frsfzGhUr = this.supplementInfo.frsfzGhUr;
      this.yyzzUrl = this.supplementInfo.yyzzUrl;
      this.sytUrl = this.supplementInfo.sytUrl;
      this.nbhjzUrl = this.supplementInfo.nbhjzUrl;
      this.yycsmtzUrl = this.supplementInfo.yycsmtzUrl;
      this.mphUrl = this.supplementInfo.mphUrl;
      //   网络图片
      //   图片id
      //   网络图片
      this.imageEcho();
    },
    downCom () {
      this.downloadByBlob(
        'https://zhibocs.oss-cn-shenzhen.aliyuncs.com/qualifications/1704794489853.png',
        '1704794489853.png'
      );
    },

    // 图片回显
    //正面回显数据

    imageEcho () {
      if (this.supplementInfo.frsfzRxUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.frsfzRxArrUrl = this.supplementInfo.frsfzRxUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.frsfzRxList = this.frsfzRxArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.frsfzRxArrUrl = this.supplementInfo.frsfzRxUrl.split();
        // 当前
        this.frsfzRxList = this.frsfzRxArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }
      // 反面回显数据
      if (this.supplementInfo.frsfzGhUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.frsfzGhArrUrl = this.supplementInfo.frsfzGhUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.frsfzGhList = this.frsfzGhArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.frsfzGhArrUrl = this.supplementInfo.frsfzGhUrl.split();
        // 当前
        this.frsfzGhList = this.frsfzGhArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }

      // 营业执照
      if (this.supplementInfo.yyzzUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.yyzzArrUrl = this.supplementInfo.yyzzUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.yyzzList = this.yyzzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.yyzzArrUrl = this.supplementInfo.yyzzUrl.split();
        // 当前
        this.yyzzList = this.yyzzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }
      //门头照片
      if (this.supplementInfo.yycsmtzUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.yycsmtzArrUrl = this.supplementInfo.yycsmtzUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.yycsmtzList = this.yycsmtzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.yycsmtzArrUrl = this.supplementInfo.yycsmtzUrl.split();
        // 当前
        this.yycsmtzList = this.yycsmtzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }
      //门牌号
      if (this.supplementInfo.mphUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.mphArrUrl = this.supplementInfo.mphUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.mphList = this.mphArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.mphArrUrl = this.supplementInfo.mphUrl.split();
        // 当前
        this.mphList = this.mphArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }
      //  收银台
      if (this.supplementInfo.sytUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.sytArrUrl = this.supplementInfo.sytUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.sytList = this.sytArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.sytArrUrl = this.supplementInfo.sytUrl.split();
        // 当前
        this.sytList = this.sytArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }

      //  内部环境
      if (this.supplementInfo.nbhjzUrl.includes(',')) {
        console.log('字符串中包含逗号');
        // 包含的进行slice(',') 分割
        this.nbhjzArrUrl = this.supplementInfo.nbhjzUrl
          .split(',')
          .map((item) => item.trim());
        console.log(this.cityArr);
        this.nbhjzList = this.nbhjzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      } else {
        console.log('字符串中不包含逗号');
        this.nbhjzArrUrl = this.supplementInfo.nbhjzUrl.split();
        // 当前
        this.nbhjzList = this.nbhjzArrUrl.map((item) => {
          return {
            name: new Date().getTime(),
            url: item
          };
        });
      }
    },

    downloadByBlob (url, name) {
      let image = new Image();
      image.setAttribute('crossOrigin', 'anonymous');
      image.src = url;
      image.onload = () => {
        let canvas = document.createElement('canvas');
        canvas.width = image.width;
        canvas.height = image.height;
        let ctx = canvas.getContext('2d');
        ctx.drawImage(image, 0, 0, image.width, image.height);
        canvas.toBlob((blob) => {
          let url = URL.createObjectURL(blob);
          this.download(url, name);
          // 用完释放URL对象
          URL.revokeObjectURL(url);
        });
      };
    },
    download (href, name) {
      let eleLink = document.createElement('a');
      eleLink.download = name;
      eleLink.href = href;
      console.log(eleLink);

      eleLink.click();
      eleLink.remove();
    },

    // 查询二级代理
    async getSecondlevelAgentFn () {
      const res = await getSecondlevelAgent({
        merchantId: this.$store.state.user.info.merchantId
      });
      console.log(res);
      if (res.code == 2000) {
        this.agentId = res.data.id;
      }
    },
    controlerLegalValidityFn (value) {
      //   this.wxSumbitForm.controlerLegalValidity = JSON.stringify(value)
    },
    // 对公 对私
    accTypeFn (e) {
      console.log(e);
      this.accTypeSelect = e;
    },
    // 小微 企业 个人
    merModeFn (e) {
      console.log(e);
      this.merModeSelect = e;
    },
    begtimeArrFn (value) {
      console.log(value);
    },
    businEndtimeArrFn (value) {
      console.log(value);
    },
    handleChangeMcc () { },
    licValidityFn (value) {
      //   this.wxSumbitForm.licValidity = JSON.stringify(value)
    },
    verifyChangesFn () { },
    regionsInput () { },
    linkmanValidityFn (value) {
      console.log(value);
      //   this.wxSumbitForm.linkmanValidity = JSON.stringify(value)
    },
    controlerLegalTypeFn () { },
    onchange (file, fileList) {
      this.fileList = [];
      this.fileList = fileList;
      console.log(this.fileList);
    },
    legalValidityFn (value) {
      console.log(value);
    },
    beforeUpload (file) {
      console.log(file);
      let fileName = file.name.substring(file.name.lastIndexOf('.') + 1);
      const extension = fileName === 'png';
      const extension2 = fileName === 'pdf';
      if (!extension && !extension2) {
        this.$message({
          message: '上传文件只能是 png、 pdf格式!',
          type: 'warning'
        });

        return false;
      }
    },
    pictureUploads () {
      if (this.fileList == undefined) {
        this.$message.error('选择图片之后再上传！！');
        return;
      }

      var pictureReq = new FormData();

      pictureReq.append('file', this.fileList[0].raw);

      console.log(pictureReq.get('file'));
    },

    // 正则匹配上传图片类型
    regexPicType (imageString) {
      const regex = /com\/(.+)/;
      const match = imageString.match(regex);

      if (match && match.length > 1) {
        const extractedString = match[1];
        // const str = this.regexType(extractedString)
        return extractedString;
      } else {
        console.log('未找到匹配的字符串');
      }
    },
    // 重新提交
    restSubmit () {
      this.incomingStatus = 1;

      this.findMatchingProperties(this.rejectReasonObject, this.wxSumbitForm);
      console.log(this.idCardNationalFileList);
    },
    followOfficialAccount () {
      this.visibleModal = !this.visibleModal;
    },
    handleClose (done) {
      this.$confirm('是否要返回支付进件页面？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then((_) => {
          done();
        })
        .catch((_) => { });
    },
    initRules () {
      console.log(this.zfbSumbitForm.merchantType);
      this.$set(this.rules, 'certNo', [
        { required: true, message: '请填写商户证件编号', trigger: 'blur' },
        {
          pattern:
            this.zfbSumbitForm.merchantType !== '06'
              ? /^[A-Z0-9]{18}$/
              : /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
          message:
            this.zfbSumbitForm.merchantType !== '06'
              ? '营业执照上的注册号/统一社会信用代码格式不对'
              : '身份证输入不合法'
        }
      ]);

      this.$set(this.rules, 'defaultSettleTarget', [
        { required: true, message: '请填写商户证件编号', trigger: 'blur' },
        {
          pattern:
            this.zfbSumbitForm.defaultSettleType == 'bankCard'
              ? /^([1-9])(\d{15}|\d{16}|\d{17}|\d{18})$/
              : /^[a-zA-Z0-9][a-zA-Z0-9._]{4,18}[a-zA-Z0-9]$/,
          message:
            this.zfbSumbitForm.defaultSettleType == 'bankCard'
              ? '请输入银行卡号'
              : '请输入支付宝账号登录号'
        }
      ]);
    },

    // 切换进件结算类型
    switchSettlementType (settlementType) {
      console.log(settlementType);
      this.zfbSumbitForm.defaultSettleType = settlementType;
      this.initRules();
      this.zfbSumbitForm.defaultSettleTarget = '';
    },

    // 图片的预览
    handlePictureCardPreview (file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = !this.dialogVisible;
    },
    // 图片的下载

    handleDownload (file) {
      window.open(file.url);
    },

    inputFn (e) {
      this.wxSumbitForm.idCardName = e;
      console.log(e);
    },

    accountBankFn (item) {
      this.wxSumbitForm.bankName = item;
    },

    //是否要关闭抽屉
    cancelForm () { },
    // 表单重置
    resetForm (formName) {
      this.$nextTick(() => {
        this.$refs[formName].resetFields();
        this.wxSumbitForm.checked = false;
        this.picListFn();
      });
    },
    // 对正则进行校验 ok了进行下一步 00注册  10补件
    async submitFn (formName, type) {
      // 判断是否有上传图片

      if (!this.frsfzRxFileid) {
        this.$message.error('请上传身份证正面');
        return;
      }

      if (!this.frsfzGhFileid) {
        this.$message.error('请上传身份证反面');
        return;
      }

      if (!this.yyzzFileid) {
        this.$message.error('请上传营业执照');
        return;
      }
      if (!this.sytFileid) {
        this.$message.error('请上传收银台照片');
        return;
      }
      if (!this.nbhjzFileid) {
        this.$message.error('请上传内部环境照片');
        return;
      }
      if (!this.yycsmtzFileid) {
        this.$message.error('请上传门头照片');
        return;
      }

      if (!this.mphFileid) {
        this.$message.error('请上传门牌照');
        return;
      }

      if (type == '00') {
        this.$refs[formName].validate(async (valid) => {
          if (valid) {
            console.log(valid);

            let wxSumbitForm;
            wxSumbitForm = {
              // 商家信息
              dsfMerinfo: {
                merMode: this.wxSumbitForm.merMode,
                merName: this.wxSumbitForm.merName,
                businName: this.wxSumbitForm.businName,
                merType: this.wxSumbitForm.merType,
                standardFlag: this.wxSumbitForm.standardFlag,
                merArea: this.wxSumbitForm.merArea,
                merAddr: this.wxSumbitForm.merAddr,
                businBegtime: this.wxSumbitForm.businBegtime,
                businEndtime: this.wxSumbitForm.businEndtime,
                employeeNum: this.wxSumbitForm.employeeNum,
                businForm: this.wxSumbitForm.businForm
              },
              // 营业执照
              dsfLicinfo: {
                merLic: this.wxSumbitForm.merLic,
                licenseType: this.wxSumbitForm.licenseType,
                licValidity: JSON.stringify(this.wxSumbitForm.licValidity),
                businScope: this.wxSumbitForm.businScope,
                capital: this.wxSumbitForm.capital,
                licAddr: this.wxSumbitForm.licAddr,
                controlerName: this.wxSumbitForm.controlerName,
                controlerLegalCode: this.wxSumbitForm.controlerLegalCode,
                controlerLegalType: this.wxSumbitForm.controlerLegalType,
                controlerLegalValidity: JSON.stringify(
                  this.wxSumbitForm.controlerLegalValidity
                )
              },

              // 附加信息
              dsfPlusinfo: {
                merLegal: this.wxSumbitForm.merLegal,
                legalType: this.wxSumbitForm.legalType,
                legalCode: this.wxSumbitForm.legalCode,
                legalValidity: JSON.stringify(
                  this.wxSumbitForm.legalValidity
                ),
                legalPhone: this.wxSumbitForm.legalPhone,
                linkMan: this.wxSumbitForm.linkMan,
                linkmanType: this.wxSumbitForm.linkmanType,
                linkmanCode: this.wxSumbitForm.linkmanCode,
                linkmanValidity: JSON.stringify(
                  this.wxSumbitForm.linkmanValidity
                ),
                linkmanPhone: this.wxSumbitForm.linkmanPhone
              },
              // 结算账户信息1
              dsfAccinfo: {
                bankName: this.wxSumbitForm.bankName,
                bankCode: this.wxSumbitForm.bankCode,
                account: this.wxSumbitForm.account,
                accName: this.wxSumbitForm.accName,
                accType: this.wxSumbitForm.accType,
                legalType: this.wxSumbitForm.legalType,

                legalCode: this.wxSumbitForm.legalCode,
                accPhone: this.wxSumbitForm.accPhone
              },
              // 结算账户信息2
              dsfAccinfoTwo: {
                bankName: this.wxSumbitForm.bankName,
                bankCode: this.wxSumbitForm.bankCode,
                account: this.wxSumbitForm.account,
                accName: this.wxSumbitForm.accName,
                accType: '10'
              },
              funcType: this.funcType,
              oemId: this.agentId,
              // frsfzRxFileid: this.frsfzRxFileid,
              // frsfzGhFileid: this.frsfzGhFileid,
              // yyzzFileid: this.yyzzFileid,
              // sytFileid: this.sytFileid,
              // nbhjzFileid: this.nbhjzFileid,
              // yycsmtzFileid: this.yycsmtzFileid,
              // mphFileid: this.mphFileid,

              frsfzRxFileid: this.frsfzRxFileid,
              frsfzGhFileid: this.frsfzGhFileid,
              yyzzFileid: this.yyzzFileid,
              sytFileid: this.sytFileid,
              nbhjzFileid: this.nbhjzFileid,
              yycsmtzFileid: this.yycsmtzFileid,
              mphFileid: this.mphFileid,

              frsfzRxUrl: this.frsfzRxUrl,
              frsfzGhUrl: this.frsfzGhUrl,
              yyzzUrl: this.yyzzUrl,
              sytUrl: this.sytUrl,
              nbhjzUrl: this.nbhjzUrl,
              yycsmtzUrl: this.yycsmtzUrl,
              mphUrl: this.mphUrl,
              merchantId: this.$store.state.user.info.merchantId
            };
            // 只有是企业和个人 才需要传二个参数其他的都只要账号1

            if (!(this.wxSumbitForm.accType == '00' && this.wxSumbitForm.merMode == '0')) {
              delete this.wxSumbitForm.dsfAccinfoTwo;
              this.wxSumbitForm.dsfAccinfo.legalType = ''
              this.wxSumbitForm.dsfAccinfo.legalCode = ''
              this.wxSumbitForm.dsfAccinfo.accPhone = ''
            }


            console.log(wxSumbitForm);
            this.loading = true;
            const res = await newMerApplyFor(wxSumbitForm);
            console.log(res);

            if (res.code == 2000) {
              this.loading = false;
              this.$message.success(res.msg);
              //  返回进件申请成功 需要进行查询当前的进件状态
              this.query();
            } else {
              this.$message.error(res.msg);
              this.query();
            }
          } else {
            this.$message.error('参数填充有误,请填写完整参数在提交');
            return false;
          }
        });
      } else {
        this.$refs[formName].validate(async (valid) => {
          if (valid) {
            console.log(valid);
            let wxSumbitForm;

            wxSumbitForm = {
              // 商家信息
              dsfMerinfo: {
                merMode: this.wxSumbitForm.merMode,
                merName: this.wxSumbitForm.merName,
                businName: this.wxSumbitForm.businName,
                merType: this.wxSumbitForm.merType,
                standardFlag: this.wxSumbitForm.standardFlag,
                merArea: this.wxSumbitForm.merArea,
                merAddr: this.wxSumbitForm.merAddr,
                businBegtime: this.wxSumbitForm.businBegtime,
                businEndtime: this.wxSumbitForm.businEndtime,
                employeeNum: this.wxSumbitForm.employeeNum,
                businForm: this.wxSumbitForm.businForm,
                id: this.supplementInfo.dsfMerinfo.id
              },
              // 营业执照
              dsfLicinfo: {
                merLic: this.wxSumbitForm.merLic,
                licenseType: this.wxSumbitForm.licenseType,
                licValidity: JSON.stringify(this.wxSumbitForm.licValidity),
                businScope: this.wxSumbitForm.businScope,
                capital: this.wxSumbitForm.capital,
                licAddr: this.wxSumbitForm.licAddr,
                controlerName: this.wxSumbitForm.controlerName,
                controlerLegalCode: this.wxSumbitForm.controlerLegalCode,
                controlerLegalType: this.wxSumbitForm.controlerLegalType,
                controlerLegalValidity: JSON.stringify(
                  this.wxSumbitForm.controlerLegalValidity
                ),
                id: this.supplementInfo.dsfLicinfo.id
              },

              // 附加信息
              dsfPlusinfo: {
                merLegal: this.wxSumbitForm.merLegal,
                legalType: this.wxSumbitForm.legalType,
                legalCode: this.wxSumbitForm.legalCode,
                legalValidity: JSON.stringify(
                  this.wxSumbitForm.legalValidity
                ),
                legalPhone: this.wxSumbitForm.legalPhone,
                linkMan: this.wxSumbitForm.linkMan,
                linkmanType: this.wxSumbitForm.linkmanType,
                linkmanCode: this.wxSumbitForm.linkmanCode,
                linkmanValidity: JSON.stringify(
                  this.wxSumbitForm.linkmanValidity
                ),
                linkmanPhone: this.wxSumbitForm.linkmanPhone,
                id: this.supplementInfo.dsfPlusinfo.id
              },
              // 结算账户信息1
              dsfAccinfo: {
                bankName: this.wxSumbitForm.bankName,
                bankCode: this.wxSumbitForm.bankCode,
                account: this.wxSumbitForm.account,
                accName: this.wxSumbitForm.accName,
                accType: this.wxSumbitForm.accType,
                legalType: this.wxSumbitForm.legalType,

                legalCode: this.wxSumbitForm.legalCode,
                accPhone: this.wxSumbitForm.accPhone,
                id: this.supplementInfo.dsfAccinfo.id
              },
              // 结算账户信息2
              dsfAccinfoTwo: {
                bankName: this.wxSumbitForm.bankName,
                bankCode: this.wxSumbitForm.bankCode,
                account: this.wxSumbitForm.account,
                accName: this.wxSumbitForm.accName,
                accType: '10',
                id: this.supplementInfo?.dsfAccinfoTwo?.id
              },
              funcType: this.funcType,
              oemId: this.agentId,
              // frsfzRxFileid: this.frsfzRxFileid,
              // frsfzGhFileid: this.frsfzGhFileid,
              // yyzzFileid: this.yyzzFileid,
              // sytFileid: this.sytFileid,
              // nbhjzFileid: this.nbhjzFileid,
              // yycsmtzFileid: this.yycsmtzFileid,
              // mphFileid: this.mphFileid,

              frsfzRxFileid: this.frsfzRxFileid,
              frsfzGhFileid: this.frsfzGhFileid,
              yyzzFileid: this.yyzzFileid,
              sytFileid: this.sytFileid,
              nbhjzFileid: this.nbhjzFileid,
              yycsmtzFileid: this.yycsmtzFileid,
              mphFileid: this.mphFileid,

              frsfzRxUrl: this.frsfzRxUrl,
              frsfzGhUrl: this.frsfzGhUrl,
              yyzzUrl: this.yyzzUrl,
              sytUrl: this.sytUrl,
              nbhjzUrl: this.nbhjzUrl,
              yycsmtzUrl: this.yycsmtzUrl,
              mphUrl: this.mphUrl,
              merchantId: this.$store.state.user.info.merchantId
            };


            if (!(this.wxSumbitForm.accType == '00' && this.wxSumbitForm.merMode == '0')) {
              wxSumbitForm.dsfAccinfoTwo = undefined;
              this.supplementInfo.dsfAccinfo.legalType = ''
              this.supplementInfo.dsfAccinfo.legalCode = ''
              this.supplementInfo.dsfAccinfo.accPhone = ''
            }
            this.$util.assignObject(this.supplementInfo, {
              ...this.supplementInfo,
              ...wxSumbitForm
            });


            console.log(this.supplementInfo);
            this.loading = true;
            const res = await merPatchSupplement({
              ...this.supplementInfo
            });
            console.log(res);
            if (res.code == 2000) {
              this.loading = false;
              this.$message.success(res.msg);
              this.query();
            } else {
              this.$message.error(res.msg);
              this.query();
            }
          } else {
            this.$message.error('参数填充有误,请填写完整参数在提交');
            return false;
          }
        });
      }

      //    在这里进行判断如果
    },
    handleFileInputChange () {
      const uploadedFile = this.$refs.fileInput.files[0];
      console.log(uploadedFile);
      const originalPath = URL.createObjectURL(uploadedFile);
      console.log('原始路径:', originalPath);
      //   const reader = new FileReader();
      //   reader.readAsDataURL(uploadedFile);
      //   reader.onload = e => {
      //     console.log(e.target.result);
      //   }
    },

    // 图片移除
    handleRemove (file, removeName) {
      let uploadFiles;
      //   法人身份证人像面
      if (removeName == 'frontCorporateIDCard') {
        uploadFiles = this.$refs.pictureFrontCorporateIDCard.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;
        // 按道理可以获取到删除的索引 那么这个时候我们可以
        // if (this.frsfzRxFileid.includes(',')) {
        //   const frzfzzArr = this.frsfzRxFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.frsfzRxArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.frsfzRxFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.frsfzRxFileid, this.frsfzRxArr)

        // } else {
        //   this.frsfzRxFileid = '';
        //   this.frsfzRxArr = []

        //   console.log(this.frsfzRxFileid, this.frsfzRxArr)

        // }
        if (this.frsfzRxUrl.includes(',')) {
          const frzfzzArr = this.frsfzRxUrl
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.frsfzRxArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.frsfzRxUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.frsfzRxUrl, this.frsfzRxArrUrl);
        } else {
          this.frsfzRxUrl = '';
          this.frsfzRxArrUrl = [];

          console.log(this.frsfzRxUrl, this.frsfzRxArrUrl);
        }
      }
      // 法人身份证国徽面
      if (removeName == 'certImageBack') {
        uploadFiles = this.$refs.pictureUploadCertImageBack.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.frsfzGhFileid.includes(',')) {
        //   const frzfzzArr = this.frsfzGhFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.frsfzGhArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.frsfzGhFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.frsfzGhFileid, this.frsfzGhArr)

        // } else {

        //   this.frsfzGhFileid = '';
        //   this.frsfzGhArr = []

        //   console.log(this.frsfzGhFileid, this.frsfzGhArr)

        // }
        if (this.frsfzGhUrl.includes(',')) {
          const frzfzzArr = this.frsfzGhUrl
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.frsfzGhArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.frsfzGhUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.frsfzGhUrl, this.frsfzGhArrUrl);
        } else {
          this.frsfzGhUrl = '';
          this.frsfzGhArrUrl = [];

          console.log(this.frsfzGhUrl, this.frsfzGhArrUrl);
        }
      }
      //  营业执照
      if (removeName == 'businessLicense') {
        uploadFiles = this.$refs.pictureUploadBusinessLicense.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.yyzzFileid.includes(',')) {
        //   const frzfzzArr = this.yyzzFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.yyzzArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.yyzzFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.yyzzFileid, this.yyzzArr)

        // } else {

        //   this.yyzzFileid = '';
        //   this.yyzzArr = []

        //   console.log(this.yyzzFileid, this.yyzzArr)

        // }
        if (this.yyzzUrl.includes(',')) {
          const frzfzzArr = this.yyzzUrl
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.yyzzArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.yyzzUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.yyzzUrl, this.yyzzArrUrl);
        } else {
          this.yyzzUrl = '';
          this.yyzzArrUrl = [];

          console.log(this.yyzzUrl, this.yyzzArrUrl);
        }
      }
      //  门头照片
      if (removeName == 'doorPhoto') {
        uploadFiles = this.$refs.pictureUploadDoorPhoto.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.yycsmtzFileid.includes(',')) {
        //   const frzfzzArr = this.yycsmtzFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.yycsmtzArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.yycsmtzFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.yycsmtzFileid, this.yycsmtzArr)

        // } else {

        //   this.yycsmtzFileid = '';
        //   this.yycsmtzArr = []

        //   console.log(this.yycsmtzFileid, this.yycsmtzArr)

        // }
        if (this.yycsmtzUrl.includes(',')) {
          const frzfzzArr = this.yycsmtzUrl
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.yycsmtzArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.yycsmtzUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.yycsmtzUrl, this.yycsmtzArrUrl);
        } else {
          this.yycsmtzUrl = '';
          this.yycsmtzArrUrl = [];
          console.log(this.yycsmtzUrl, this.yycsmtzArrUrl);
        }
      }
      //  门牌号
      if (removeName == 'houseNumber') {
        uploadFiles = this.$refs.pictureUploadHouseNumber.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.mphFileid.includes(',')) {
        //   const frzfzzArr = this.mphFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.mphArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.mphFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.mphFileid, this.mphArr)

        // } else {

        //   this.mphFileid = '';
        //   this.mphArr = []

        //   console.log(this.mphFileid, this.mphArr)

        // }
        if (this.mphUrl.includes(',')) {
          const frzfzzArr = this.mphUrl.split(',').map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.mphArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.mphUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.mphUrl, this.mphArrUrl);
        } else {
          this.mphUrl = '';
          this.mphArrUrl = [];

          console.log(this.mphUrl, this.mphArrUrl);
        }
      }
      //  内部环境照
      if (removeName == 'internalEnvironment') {
        uploadFiles = this.$refs.pictureInternalEnvironment.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.nbhjzFileid.includes(',')) {
        //   const frzfzzArr = this.nbhjzFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.nbhjzArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.nbhjzFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.nbhjzFileid, this.nbhjzArr)

        // } else {

        //   this.nbhjzFileid = '';
        //   this.nbhjzArr = []

        //   console.log(this.nbhjzFileid, this.nbhjzArr)

        // }
        if (this.nbhjzUrl.includes(',')) {
          const frzfzzArr = this.nbhjzUrl
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.nbhjzArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.nbhjzUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.nbhjzUrl, this.nbhjzArrUrl);
        } else {
          this.nbhjzUrl = '';
          this.nbhjzArrUrl = [];

          console.log(this.nbhjzUrl, this.nbhjzArrUrl);
        }
      }
      //  收银台
      if (removeName == 'cashier') {
        uploadFiles = this.$refs.pictureUploadCashier.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.sytFileid.includes(',')) {
        //   const frzfzzArr = this.mphFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.sytArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.sytFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.sytFileid, this.sytArr)

        // } else {

        //   this.sytFileid = '';
        //   this.sytArr = []

        //   console.log(this.sytFileid, this.sytArr)

        // }
        if (this.sytUrl.includes(',')) {
          const frzfzzArr = this.mphFileid
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.sytArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.sytUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.sytUrl, this.sytArrUrl);
        } else {
          this.sytUrl = '';
          this.sytArrUrl = [];

          console.log(this.sytUrl, this.sytArrUrl);
        }
      }
      //  银行卡
      if (removeName == 'privateBankCard') {
        uploadFiles = this.$refs.pictureUploadPrivateBankCard.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.yhkFileid.includes(',')) {
        //   const frzfzzArr = this.mphFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.yhkArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.yhkFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.yhkFileid, this.yhkArr)

        // } else {

        //   this.yhkFileid = '';
        //   this.yhkArr = []
        //   console.log(this.yhkFileid, this.yhkArr)

        // }

        if (this.yhkUrl.includes(',')) {
          const frzfzzArr = this.mphFileid
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.yhkArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.yhkUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.yhkUrl, this.yhkArrUrl);
        } else {
          this.yhkUrl = '';
          this.yhkArrUrl = [];
          console.log(this.yhkUrl, this.yhkArrUrl);
        }
      }
      //清算授权书
      if (removeName == 'clearingAuthorizationLetter') {
        uploadFiles =
          this.$refs.pictureClearingAuthorizationLetter.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.qssqsFileid.includes(',')) {
        //   const frzfzzArr = this.mphFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.qssqsArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.qssqsFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.qssqsFileid, this.qssqsArr)

        // } else {

        //   this.qssqsFileid = '';
        //   this.qssqsArr = []
        //   console.log(this.qssqsFileid, this.qssqsArr)

        // }
        if (this.qssqsUrl.includes(',')) {
          const frzfzzArr = this.mphFileid
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.qssqsArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.qssqsUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.qssqsUrl, this.qssqsArrUrl);
        } else {
          this.qssqsUrl = '';
          this.qssqsArrUrl = [];
          console.log(this.qssqsUrl, this.qssqsArrUrl);
        }
      }

      //  开户许可证

      if (removeName == 'accountOpeningPermit') {
        uploadFiles = this.$refs.pictureAccountOpeningPermit.uploadFiles;
        // 第一步需要删除 所选中 file 返回 最新的图片列表 然后 在复制给图片

        const mediaIdIndex = uploadFiles.findIndex((item) => {
          return item.uid == file.uid;
        });
        uploadFiles.splice(mediaIdIndex, 1);
        this.fileListSelect = uploadFiles;

        // 按道理可以获取到删除的索引 那么这个时候我们可以

        // if (this.khxkzFileid.includes(',')) {
        //   const frzfzzArr = this.mphFileid.split(',').map((item) => item.trim());
        //   // 1 删除图片id 第二个删除图片数组里面的内容
        //   this.khxkzArr.splice(mediaIdIndex, 1);
        //   frzfzzArr.splice(mediaIdIndex, 1);
        //   this.khxkzFileid = frzfzzArr.length === 1 ? frzfzzArr[0].toString() : frzfzzArr.join(',');
        //   console.log(this.khxkzFileid, this.khxkzArr)

        // } else {

        //   this.khxkzFileid = '';
        //   this.khxkzArr = []
        //   console.log(this.khxkzFileid, this.khxkzArr)

        // }

        if (this.khxkzUrl.includes(',')) {
          const frzfzzArr = this.mphFileid
            .split(',')
            .map((item) => item.trim());
          // 1 删除图片id 第二个删除图片数组里面的内容
          this.khxkzArrUrl.splice(mediaIdIndex, 1);
          frzfzzArr.splice(mediaIdIndex, 1);
          this.khxkzUrl =
            frzfzzArr.length === 1
              ? frzfzzArr[0].toString()
              : frzfzzArr.join(',');
          console.log(this.khxkzUrl, this.khxkzArrUrl);
        } else {
          this.khxkzUrl = '';
          this.khxkzArrUrl = [];
          console.log(this.khxkzUrl, this.khxkzArrUrl);
        }
      }
    },
    // 图片上传
    handleFileChange (file, fileList, picModeType, picMode) {
      console.log(file)

      console.log(file, fileList, picModeType);
      this.fileListSelect = fileList;
      let pass = this.beforeAvatarUpload(file, picMode)

      //  this.wxUploadBj(picModeType, picMode)

      if (pass) {
        this.wxUploadBj(picModeType, picMode);
      }

    },
    async wxUploadBj (imgType, picMode) {


      if (!this.fileListSelect.length) {
        console.log('请选择文件后提交');
        this.$message.error('请选择文件后提交');
        return;
      }

      this.data = await userOssSignature();
      console.log(this.fileListSelect[this.fileListSelect.length - 1]);

      let file = this.fileListSelect[this.fileListSelect.length - 1].raw;

      let filename = file.name;
      let markIndex = filename.lastIndexOf('.');
      let suffix = filename.substring(markIndex);
      let date = new Date().getTime();
      // 构建请求参数
      let param = new FormData();
      param.append('key', this.data.dir + imgType + '/' + date + suffix);
      param.append('policy', this.data.policy);
      param.append('OSSAccessKeyId', this.data.accessId);
      param.append('success_action_status', '200');
      // param.append("callback",  this.data.callback)     //回调（not)
      param.append('signature', this.data.signature);
      param.append('file', file, file.name);
      param.append('success_action_status', '200');
      let config = {
        headers: {
          'Access-Control-Allow-Origin': '*',
          'x-oss-callback-Authorization': getToken()
        }
      };
      console.log('suffix', suffix);

      let res = await axios.post(this.data.host, param, config);
      let url;
      if (res.status == 200) {
        url = this.data.host + '/' + imgType + '/' + date + suffix;

        console.log('上传图片成功=======', res);
        console.log('this.data.host', url);


        if (picMode == '01') {
          //   this.frsfzRxArr.push(new Date().getTime())
          this.frsfzRxArrUrl.push(url);
          //   this.frsfzRxFileid = this.frsfzRxArr.length === 1 ? this.frsfzRxArr[0].toString() : this.frsfzRxArr.join(',');
          this.frsfzRxUrl =
            this.frsfzRxArrUrl.length === 1
              ? this.frsfzRxArrUrl[0].toString()
              : this.frsfzRxArrUrl.join(',');
          console.log(this.frsfzRxFileid);
          console.log(this.frsfzRxUrl);
        } else if (picMode == '02') {
          //   this.frsfzGhArr.push(new Date().getTime())
          this.frsfzGhArrUrl.push(url);
          //   this.frsfzGhFileid = this.frsfzGhArr.length === 1 ? this.frsfzGhArr[0].toString() : this.frsfzGhArr.join(',');
          this.frsfzGhUrl =
            this.frsfzGhArrUrl.length === 1
              ? this.frsfzGhArrUrl[0].toString()
              : this.frsfzGhArrUrl.join(',');
          console.log(this.frsfzGhFileid);
        } else if (picMode == '05') {
          //   this.yyzzArr.push(new Date().getTime())
          this.yyzzArrUrl.push(url);
          //   this.yyzzFileid = this.yyzzArr.length === 1 ? this.yyzzArr[0].toString() : this.yyzzArr.join(',');
          this.yyzzUrl =
            this.yyzzArrUrl.length === 1
              ? this.yyzzArrUrl[0].toString()
              : this.yyzzArrUrl.join(',');
          console.log(this.yyzzFileid);
        } else if (picMode == '06') {
          //   this.sytArr.push(new Date().getTime())
          this.sytArrUrl.push(url);
          //   this.sytFileid = this.sytArr.length === 1 ? this.sytArr[0].toString() : this.sytArr.join(',');
          this.sytUrl =
            this.sytArrUrl.length === 1
              ? this.sytArrUrl[0].toString()
              : this.sytArrUrl.join(',');
          console.log(this.sytFileid);
          console.log(this.sytUrl);
        } else if (picMode == '07') {
          //   this.nbhjzArr.push(new Date().getTime())
          this.nbhjzArrUrl.push(url);
          //   this.nbhjzFileid = this.nbhjzArr.length === 1 ? this.nbhjzArr[0].toString() : this.nbhjzArr.join(',');
          this.nbhjzUrl =
            this.nbhjzArrUrl.length === 1
              ? this.nbhjzArrUrl[0].toString()
              : this.nbhjzArrUrl.join(',');
          console.log(this.nbhjzFileid);
        } else if (picMode == '08') {
          //   this.yycsmtzArr.push(new Date().getTime())
          this.yycsmtzArrUrl.push(url);
          //   this.yycsmtzFileid = this.yycsmtzArr.length === 1 ? this.yycsmtzArr[0].toString() : this.yycsmtzArr.join(',');
          this.yycsmtzUrl =
            this.yycsmtzArrUrl.length === 1
              ? this.yycsmtzArrUrl[0].toString()
              : this.yycsmtzArrUrl.join(',');
          console.log(this.yycsmtzFileid);
        } else if (picMode == '09') {
          //   this.mphArr.push(new Date().getTime())
          this.mphArrUrl.push(url);
          //   this.mphFileid = this.mphArr.length === 1 ? this.mphArr[0].toString() : this.mphArr.join(',');
          this.mphUrl =
            this.mphArrUrl.length === 1
              ? this.mphArrUrl[0].toString()
              : this.mphArrUrl.join(',');
          console.log(this.mphFileid);
        } else if (picMode == '14') {
          //   this.yhkArr.push(new Date().getTime())
          this.yhkArrUrl.push(url);
          //   this.yhkFileid = this.yhkArr.length === 1 ? this.yhkArr[0].toString() : this.yhkArr.join(',');
          this.yhkFileidArr =
            this.yhkArrUrl.length === 1
              ? this.yhkArrUrl[0].toString()
              : this.yhkArrUrl.join(',');
          console.log(this.yhkFileid);
        } else if (picMode == '13') {
          //   this.khxkArr.push(new Date().getTime())
          this.khxkArrUrl.push(url);
          //   this.khxkzFileid = this.khxkArr.length === 1 ? this.khxkArr[0].toString() : this.khxkArr.join(',');
          this.khxkzUrl =
            this.khxkArrUrl.length === 1
              ? this.khxkArrUrl[0].toString()
              : this.khxkArrUrl.join(',');
          console.log(this.khxkzFileid);
        } else if (picMode == '15') {
          //   this.frzfzzArr.push(new Date().getTime())
          this.frzfzzArrUrl.push(url);
          //   this.qssqsFileid = this.frzfzzArr.length === 1 ? this.frzfzzArr[0].toString() : this.frzfzzArr.join(',');
          this.qssqsUrl =
            this.frzfzzArrUrl.length === 1
              ? this.frzfzzArrUrl[0].toString()
              : this.frzfzzArrUrl.join(',');
          console.log(this.qssqsFileid);
        }






        // https://zhibocs.oss-cn-shenzhen.aliyuncs.com/qualifications/1704794489853.png
        // let urlObject = {
        //   url: url,
        //   filename: date + suffix
        // }
        // const results = await upload111(urlObject);
        // console.log(results)
        // const ress = await wxGetUploadMediaId({
        //   pathName: results.msg,
        //   picMode: picMode
        // });

        // console.log(ress)
        // // 法人身份证人像面  01  法人身份证国徽面 02  营业执照 05 06-收银台  内部环境照 07 08-营业场所门头照  09-门牌号
        // if (ress.data.code == 2000) {
        //   if (picMode == '01') {
        //     this.frsfzRxArr.push()
        //     this.frsfzRxArrUrl.push(url)
        //     this.frsfzRxFileid = this.frsfzRxArr.length === 1 ? this.frsfzRxArr[0].toString() : this.frsfzRxArr.join(',');
        //     this.frsfzRxUrl = this.frsfzRxArrUrl.length === 1 ? this.frsfzRxArrUrl[0].toString() : this.frsfzRxArrUrl.join(',');
        //     console.log(this.frsfzRxFileid)
        //     console.log(this.frsfzRxUrl)
        //   } else if (picMode == '02') {
        //     this.frsfzGhArr.push(new Date().getTime())

        //     this.frsfzGhFileid = this.frsfzGhArr.length === 1 ? this.frsfzGhArr[0].toString() : this.frsfzGhArr.join(',');
        //     console.log(this.frsfzGhFileid)
        //   } else if (picMode == '05') {
        //     this.yyzzArr.push(new Date().getTime())

        //     this.yyzzFileid = this.yyzzArr.length === 1 ? this.yyzzArr[0].toString() : this.yyzzArr.join(',');
        //     console.log(this.yyzzFileid)
        //   } else if (picMode == '06') {
        //     this.sytArr.push(new Date().getTime())

        //     this.sytFileid = this.sytArr.length === 1 ? this.sytArr[0].toString() : this.sytArr.join(',');
        //     console.log(this.sytFileid)
        //   } else if (picMode == '07') {

        //     this.nbhjzArr.push(new Date().getTime())
        //     nbhjId.push(new Date().getTime())
        //     this.nbhjzFileid = this.nbhjzArr.length === 1 ? this.nbhjzArr[0].toString() : this.nbhjzArr.join(',');
        //     console.log(this.nbhjzFileid)
        //   } else if (picMode == '08') {
        //     this.yycsmtzArr.push(new Date().getTime())

        //     this.yycsmtzFileid = this.yycsmtzArr.length === 1 ? this.yycsmtzArr[0].toString() : this.yycsmtzArr.join(',');
        //     console.log(this.yycsmtzFileid)
        //   } else if (picMode == '09') {

        //     this.mphArr.push(new Date().getTime())
        //     this.mphFileid = this.mphArr.length === 1 ? this.mphArr[0].toString() : this.mphArr.join(',');
        //     console.log(this.mphFileid)
        //   } else if (picMode == '14') {

        //     this.yhkArr.push(new Date().getTime())
        //     this.yhkFileid = this.yhkArr.length === 1 ? this.yhkArr[0].toString() : this.yhkArr.join(',');
        //     console.log(this.yhkFileid)
        //   } else if (picMode == '14') {

        //     this.yhkArr.push(new Date().getTime())
        //     this.yhkFileid = this.yhkArr.length === 1 ? this.yhkArr[0].toString() : this.yhkArr.join(',');
        //     console.log(this.yhkFileid)
        //   } else if (picMode == '13') {
        //     this.khxkArr.push(new Date().getTime())
        //     this.khxkzFileid = this.khxkArr.length === 1 ? this.khxkArr[0].toString() : this.khxkArr.join(',');
        //     console.log(this.khxkzFileid)
        //   } else if (picMode == '15') {
        //     this.frzfzzArr.push(new Date().getTime())
        //     this.qssqsFileid = this.frzfzzArr.length === 1 ? this.frzfzzArr[0].toString() : this.frzfzzArr.join(',');
        //     console.log(this.qssqsFileid)
        //   }
        // } else {
        //   this.$message.error(ress.data.msg)
        // }
        // 可以根据 picMode 给那个图片添加
      } else {
        this.$message.error('上传失败');
      }

      //   this.data = await userOssSignature();
      //   console.log(this.fileList[this.fileList.length - 1]);

      //   let file = this.fileList[this.fileList.length - 1].raw;
      //   let imgType = this.fileList[this.fileList.length - 1].imgType;
      //   let filename = file.name;
      //   let markIndex = filename.lastIndexOf('.');
      //   let suffix = filename.substring(markIndex);
      //   let date = new Date().getTime();
      //   // 构建请求参数
      //   let param = new FormData();
      //   //   param.append('key', this.data.dir + imgType + '/' + date + suffix);
      //   //   param.append('policy', this.data.policy);
      //   //   param.append('OSSAccessKeyId', this.data.accessId);
      //   //   param.append('success_action_status', '200');
      //   //   // param.append("callback",  this.data.callback)     //回调（not)
      //   //   param.append('signature', this.data.signature);
      //   //   console.log(file.raw)
      //   param.append('pathName', file.raw);
      //   let param = {
      //     "fileName": "E:\\ykl-module-pay\\target\\classes\\a.jpg",
      //     "picMode": "01",
      //     "version": "1.0",
      //     "clientCode": "61165070",
      //     "MAC": "21D795BD2F4E90F117335159D777DC6A"
      //   };
      //   param.append('pathName', 'E:\\ykl-module-pay\\target\\classes\\a.jpg');

      //   param.append('picMode', 10);
      //   axios.post('https://mtest.eycard.cn:4443/AG_MerchantManagementSystem_Core/agent/api/imgUpl', param, {
      //     headers: { 'Content-Type': 'multipart/form-data' },//定义内容格式,很重要
      //     timeout: 20000,
      //   }).then(response => {
      //     //...some logic
      //   }).catch(err => { })

      //   param.append('success_action_status', '200');
      //   let config = {
      //     headers: {
      //       'Access-Control-Allow-Origin': '*',
      //       'x-oss-callback-Authorization': getToken()
      //     }
      //   };
      //   console.log('suffix', suffix);

      //   let res = await axios.post(this.data.host, param, config);
      //   let url;
      //   if (res.status == 200) {
      //     url = this.data.host + '/' + imgType + '/' + date + suffix;

      //     console.log('上传图片成功=======', res);
      //     console.log('this.data.host', url);

      //     this.wxPictureArr.push({ picUrls: url, uid: file.uid });
      //   } else {
      //     this.$message.error('上传失败');
      //   }
      //   console.log(url + '===========')
      //   console.log(param)

      //   const reader = new FileReader();
      //   reader.readAsDataURL(uploadedFile);
      //   reader.onload = e => {
      //     console.log(e.target.result);
      //   }

      //   const reader = new FileReader();
      //   reader.readAsDataURL(file.raw);
      //   reader.onload = e => {
      //     console.log(e.target.result);
      //   }

      //   const result = await wxGetUploadMediaId({
      //     pathName: "C:\\Users\\yry\\Desktop\\yuntt\\ytt\\src\\static\check.png",
      //     picMode: '01'
      //   });
      //   //   https://yuntt.weijuyunke.com/H5/static/4.png
      //   // E:\\123.jpg
      //   var form = new FormData();

      //   let list = [
      //     { "picMode": result.data.data.form.picMode },
      //     { "version": result.data.data.form.version },
      //     { "clientCode": result.data.data.form.clientCode },
      //     { "MAC": result.data.data.form.MAC }
      //   ]
      //   let jsonStr = JSON.stringify(list);

      //   form.append("form", result.data.data.form);//
      //   //   form.append("version", result.data.data.form.version);//
      //   //   form.append("clientCode", result.data.data.form.clientCode);//
      //   //   form.append("MAC", result.data.data.form.MAC);//
      //   form.append("file", result.data.data.file);//

      //   console.log(result.data.form)
      //   axios.post('https://mtest.eycard.cn:4443/AG_MerchantManagementSystem_Core/agent/api/imgUpl', form, {
      //     headers: { 'Content-Type': 'multipart/form-data' },//定义内容格式,很重要

      //   }).then(response => {
      //     //...some logic
      //   }).catch(err => { })

      // 当个MediaId 是字符串 多个是数组  营业执照和正反面的身份证是字符串格式其他的都是数组格式
      //   if (result.data.code == 200) {
      //     if (imgType == 'licenseCopy') {
      //       // 营业执照照片
      //       this.wxSumbitForm.licenseCopyMediaId = [
      //         { id: result.data.data.mediaId, uid: file.uid }
      //       ];
      //       console.log(this.wxSumbitForm.licenseCopyMediaId);
      //     } else if (imgType == 'storeEntrancePic') {
      //       // 门头照片
      //       this.wxSumbitForm.storeEntrancePicMediaId.push({
      //         id: result.data.data.mediaId,
      //         uid: file.uid
      //       });
      //       console.log(this.wxSumbitForm.storeEntrancePic);
      //     } else if (imgType == 'indoorPic') {
      //       // 办公环境
      //       this.wxSumbitForm.indoorPicMediaId.push({
      //         id: result.data.data.mediaId,
      //         uid: file.uid
      //       });
      //       console.log(this.wxSumbitForm.indoorPicMediaId);
      //     } else if (imgType == 'qualifications') {
      //       // 特殊资历
      //       this.wxSumbitForm.qualificationsMediaId.push({
      //         id: result.data.data.mediaId,
      //         uid: file.uid
      //       });
      //       console.log(this.wxSumbitForm.qualificationsMediaId);
      //     } else if (imgType == 'idCardCopy') {
      //       // 正面身份证头像
      //       this.wxSumbitForm.idCardCopyMediaId = [
      //         { id: result.data.data.mediaId, uid: file.uid }
      //       ];
      //       console.log(this.wxSumbitForm.idCardCopyMediaId);
      //     } else if (imgType == 'idCardNational') {
      //       // 反面身份证头像
      //       this.wxSumbitForm.idCardNationalMediaId = [
      //         { id: result.data.data.mediaId, uid: file.uid }
      //       ];
      //       console.log(this.wxSumbitForm.idCardNationalMediaId);
      //     }
      //     this.disabled = false;
      //   }
    },

    // 提交图片之前的一些限制
    beforeAvatarUpload (file, model) {
      // const isJPG = file.type === 'image/jpeg';
      let uploadFiles
      console.log(file);
      const isJPG = file.raw.type;
      const isLt2M = file.raw.size / 1024 / 1024 < 2;

      const extension1 = file.raw.type === 'image/jpg';
      const extension2 = file.raw.type === 'image/jpeg';
      const extension3 = file.raw.type === 'image/png';
      const extension4 = file.raw.type === 'image/bmp';
      if (!extension1 && !extension2 && !extension3 && !extension4) {
        this.$message.error('请上传jpg 、png、jpeg、bmp 类型图片!');
        if (model == '01') {
          // 法人身份证人像面
          uploadFiles = this.$refs.pictureFrontCorporateIDCard.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
          //   
        } else if (model == '02') {
          // 法人身份证国徽面
          uploadFiles = this.$refs.pictureUploadCertImageBack.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '05') {
          //  资格证书
          uploadFiles = this.$refs.pictureUploadBusinessLicense.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '08') {
          // 门头照片
          uploadFiles = this.$refs.pictureUploadDoorPhoto.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '09') {
          // 门牌号
          uploadFiles = this.$refs.pictureUploadHouseNumber.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '06') {
          // 收银台
          uploadFiles = this.$refs.pictureUploadCashier.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '07') {
          // 内部环境照片
          uploadFiles = this.$refs.pictureInternalEnvironment.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '07') {
          // 
          uploadFiles = this.$refs.pictureInternalEnvironment.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '13') {
          // 开户许可证
          uploadFiles = this.$refs.pictureAccountOpeningPermit.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '13') {
          // 开户许可证
          uploadFiles = this.$refs.pictureAccountOpeningPermit.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);
        } else if (model == '15') {
          // 清算授权书
          uploadFiles = this.$refs.pictureClearingAuthorizationLetter.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);

        } else if (model == '14') {
          // 银行卡
          uploadFiles = this.$refs.pictureUploadPrivateBankCard.uploadFiles;
          const mediaIdIndex = uploadFiles.findIndex((item) => {
            return item.uid == file.uid;
          });
          uploadFiles.splice(mediaIdIndex, 1);

        }



        return;
      }
      if (!isLt2M) {
        this.$message.error('上传图片大小不能超过 2MB!');
        return;
      }

      return isJPG && isLt2M;
    },

    //  图片上传个数超过限制
    exceedFn () {
      this.$message({
        message: '图片上传已达到上限,请删除后再上传',
        type: 'warning'
      });
    },

    /* 表格数据源 */
    datasource ({ page, limit, where, order }) {
      //   console.log(where, order);
      if (!where.deleted) where.deleted = 0;
      return pageMerchant({ ...where, ...order, page, limit, oemType: 1 });
    },
    /* 刷新表格 */
    reload (where) {
      console.log('where', where);
      this.$refs.table.reload({ page: 1, where: where });
    },
    modifyRate () {
      this.current = null;
      this.showEdit = true;
    },
    /* 打开划拨编辑弹窗 */
    openTransfer (row) {
      this.current = row;
      this.showTransfer = true;
    },
    /* 打开导入弹窗 */
    openImport () {
      this.showImport = true;
    },
    /* 删除 */
    remove (row) {
      const loading = this.$loading({ lock: true });
      removeUsers({ ids: [row.id] })
        .then((msg) => {
          loading.close();
          this.$message.success(msg);
          this.reload();
        })
        .catch((e) => {
          loading.close();
          this.$message.error(e.message);
        });
    },
    /*重置密码*/
    resets (row) {
      const loading = this.$loading({ lock: true });
      console.log('row', row);
      resetPassword({ id: row.id })
        .then((msg) => {
          loading.close();
          this.$message.success(msg);
          this.reload();
        })
        .catch((e) => {
          loading.close();
          this.$message.error(e.message);
        });
    },
    /* 批量删除 */
    removeBatch () {
      if (!this.selection.length) {
        this.$message.error('请至少选择一条数据');
        return;
      }
      this.$confirm('确定要删除选中的代理吗?', '提示', {
        type: 'warning'
      })
        .then(() => {
          const loading = this.$loading({ lock: true });
          removeUsers({ ids: this.selection.map((d) => d.id) })
            .then((msg) => {
              loading.close();
              this.$message.success(msg);
              this.reload();
            })
            .catch((e) => {
              loading.close();
              this.$message.error(e.message);
            });
        })
        .catch(() => { });
    },
    /* 更改状态 */
    editStatus (row) {
      const loading = this.$loading({ lock: true });
      updateUserStatus(row.id, row.status)
        .then((msg) => {
          console.log('msg=======', msg);
          loading.close();
          this.$message.success(
            row.status == 1 ? '启用成功！' : '冻结成功！'
          );
        })
        .catch((e) => {
          loading.close();
          row.status = !row.status ? 1 : 0;
          this.$message.error(e);
        });
    },
    // 切换 1 为 微信 2 为支付宝
    incomingType (index) {
      console.log(index);
      this.selectIncomingTypeStatus = index;
      this.funcType = index;
    }
  }
};
</script>

<style lang="less" scoped>
h6 {
  line-height: 1.5;
}

.loading-div {
  width: 100%;
  position: absolute;
}
/deep/.el-cascader--medium {
  width: 100%;
}
/deep/.el-select {
  min-width: 100%;
}
/deep/ .el-dialog__wrapper {
  z-index: 3000 !important;
}

.el-row-active {
  padding: 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.el-row {
  padding: 30px;
  min-width: 400px;
}
.fromSubmitThree {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 400px;
  padding: 0px 280px;
  line-height: 1.5;

  .examine {
    color: #000;
    margin-bottom: 29px;
    font-size: 24px;
  }
  .closePage {
    width: 186px;
    height: 60px;
    border-radius: 43px;
    border: 1px solid #1e6ceb;
    color: #1e6ceb;
    margin-top: 57px;
  }
  .successSubmit {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 186px;
    height: 60px;
    border-radius: 43px;
    background: #1890ff;
    // box-shadow: 0px 4px 4px 0px #ff4d4f;
    margin-top: 57px;
  }
}
.fromSubmitThree {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 400px;
  padding: 0px 280px;
  line-height: 1.5;

  .examine {
    color: #000;
    margin-bottom: 29px;
    font-size: 24px;
  }
  .closePage {
    width: 186px;
    height: 60px;
    border-radius: 43px;
    border: 1px solid #1e6ceb;
    color: #1e6ceb;
    margin-top: 57px;
  }
  .resubmit {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 186px;
    height: 60px;
    border-radius: 43px;
    background: #ff4d4f;
    // box-shadow: 0px 4px 4px 0px #ff4d4f;
    margin-top: 57px;
  }
}
.zfbIncoming() {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 283px;
  height: 90px;
  box-sizing: border-box;
  position: relative;

  .zfbHLabel {
    margin: 10px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/zfbIcon.svg');
      display: inline-block;
      vertical-align: middle;
      margin-top: 10px;
      margin-right: 10px;
    }
  }
  .zfbText {
    .zfbTextFontSize {
      color: #000;
      margin-bottom: 5px;
      font-size: 20px;
    }
    .activr-zfbTextFontSize {
      color: #0077e5;
      margin-bottom: 5px;
      font-size: 20px;
    }
  }
}
.allIncoming() {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 283px;
  height: 90px;
  box-sizing: border-box;
  position: relative;

  .zfbHLabel {
    margin: 10px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/zfbIcon.svg');
      display: inline-block;
      vertical-align: middle;
      margin-top: 10px;
      margin-right: 10px;
    }
  }
  .zfbText {
    .zfbTextFontSize {
      color: #000;
      margin-bottom: 5px;
      font-size: 20px;
    }
    .activr-zfbTextFontSize {
      color: #0077e5;
      margin-bottom: 5px;
      font-size: 20px;
    }
  }
}
.wxIncoming() {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 283px;
  height: 90px;
  position: relative;
  box-sizing: border-box;
  .wxHLabel {
    margin: 15px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/wxIcon.svg');
      display: inline-block;
      vertical-align: middle;
      margin-top: 10px;
      margin-right: 10px;
    }
  }

  .wxText {
    .wxTextFontSize {
      color: #000;

      font-size: 20px;
      margin-bottom: 5px;
    }
    .activr-wxTextFontSize {
      color: #0077e5;
      margin-bottom: 5px;
      font-size: 20px;
    }
  }
}

.incomingTypeSwitch() {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  .wxIncoming {
    margin-right: 25px;
    .wxIncoming();
  }

  .active-wxIncoming {
    margin-right: 25px;
    background: #e9f7ff;
    border-radius: 10px;
    border: 1px solid #1890ff;
    .wxIncoming();
    &::before {
      content: url('../../../static/check.png');
      position: absolute;
      width: 25px;
      height: 14px;
      border-radius: 10px 0px;
      border: 1px solid #1890ff;
      background: #1890ff;
      right: 0;
      bottom: 0;
      line-height: 17px;
      text-align: center;
    }
  }
  .zfbIncoming {
    //   background: #e9f7ff;
    .zfbIncoming();
  }
  .allIncoming {
    //   background: #e9f7ff;
    .allIncoming();
  }
  .active-allIncoming {
    background: #e9f7ff;
    border-radius: 10px;
    border: 1px solid #1890ff;
    .allIncoming();
    &::before {
      content: url('../../../static/check.png');
      position: absolute;
      width: 25px;
      height: 14px;
      border-radius: 10px 0px;
      border: 1px solid #1890ff;
      background: #1890ff;
      right: 0;
      bottom: 0;
      line-height: 17px;
      text-align: center;
    }
  }
}
.el-row {
  padding: 30px;
}
.el-row-active {
  padding: 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zfb-purple {
  .zfbHLabel {
    margin: 15px 0 20px;
    font-weight: 700;
    &::before {
      content: url('../../../static/svg/zfbIcon.svg');
      display: inline-block;
      vertical-align: middle;

      margin-right: 5px;
    }
  }

  .fromSubmitOne {
    .subjectTypeSwitch {
      display: flex;
      height: 36px;
      line-height: 36px;
      justify-content: flex-start;
      border-radius: 3%;
      width: 160px;

      background-color: #fff;
      border: 1px solid #d9d9d9;
      text-align: center;
      .enterprise {
        //   overflow: hidden;
        background-color: #fff;
        width: 40%;
      }
      .individuality {
        color: #fff;
        background-color: #289aff;

        width: 60%;
      }
      .active-enterprise {
        width: 40%;
        color: #fff;
        background-color: #289aff;
      }
      .active-individuality {
        color: #606266;
        background-color: #fff;
        width: 60%;
      }
    }
    .incomingTypeSwitch {
      .incomingTypeSwitch();
    }

    .active-incomingTypeSwitch {
      .incomingTypeSwitch();
      padding-bottom: 30px;
      border-bottom: 1px solid #dadada;
    }
    .hLabel {
      margin: 15px 0 20px;
      font-weight: 700;
      &::before {
        content: '';
        display: inline-block;
        vertical-align: top;

        margin-right: 5px;
        height: 23px;
        width: 6px;
        background-color: #1e6ceb;
      }
    }
    .businessLicenseTime {
      display: flex;

      justify-content: flex-start;
      align-items: center;
    }
    /deep/.el-range-editor--medium.el-input__inner {
      width: 600px !important;
    }
    .ruleForm {
      /deep/.el-form-item__label {
        color: #000;
      }
      /deep/.el-form-item {
        max-width: 737px;
        min-width: 245px;
      }
      /deep/ .el-upload--picture-card {
        line-height: 178px;
      }
      span {
        color: #b4b4b4;
      }
      .rejectReasonCss {
        color: #ff4d4f;
        margin: 20px 0;
      }
    }
    .drawer__footer {
      max-width: 737px;
      min-width: 337px;

      display: flex;
      justify-content: center;
      margin-top: 60px;
    }
  }
}
</style>
